mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
[Game] Invalidate view when hiding replaced card menu (#7453)
* [Game] Invalidate view when hiding replaced card menu Hide any visible card menu before replacing and invalidate viewport. * [Game] Fix viewport update compile error in setCardMenu QWidget::update has no QRectF overload, and sceneRect is in scene coordinates rather than viewport coordinates anyway, so invalidate the whole viewport instead. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
5d06bb903d
commit
4c5a5e3e55
1 changed files with 6 additions and 0 deletions
|
|
@ -1060,6 +1060,12 @@ void TabGame::setCardMenu(CardMenu *menu)
|
|||
return;
|
||||
}
|
||||
|
||||
if (aCardMenu->menu() && aCardMenu->menu()->isVisible()) {
|
||||
aCardMenu->menu()->hide();
|
||||
if (gameView && gameView->viewport()) {
|
||||
gameView->viewport()->update();
|
||||
}
|
||||
}
|
||||
if (menu) {
|
||||
aCardMenu->setMenu(menu);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue