[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:
BruebachL 2026-10-11 15:36:11 +02:00 • committed by GitHub
parent 5d06bb903d
commit 4c5a5e3e55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {