manage display event corectly

This commit is contained in:
Geoffray Levasseur committed 2026-11-03 14:14:36 +01:00
1 parent 92c520dc08
commit 6491f723ff
8 files changed
+22 -38

No files matched your search

+5 -8
View File
@@ -92,6 +92,11 @@ WondersDlg::WondersDlg(QWidget *parent) : BufferedDrawDlg(parent), ui(new Ui::Wo
ui->closeBtn->setButtonIndex(0);
ui->closeBtn->onClick = [this] { close(); };
initButtons();
onShow = [this] {
setWindowTitle(phrase(QStringLiteral("TITLE_WONDERS")));
selection = -1;
offscreenPaint();
};
}
WondersDlg::~WondersDlg()
@@ -281,14 +286,6 @@ void WondersDlg::vpaint(Dpi::Canvas &canvas)
loweredTextOut(canvas, -1, *MainTexture, (width() - biColorTextWidth(canvas, s)) / 2, height() - 3 - 36 + 10, s);
}
void WondersDlg::showEvent(QShowEvent *event)
{
BufferedDrawDlg::showEvent(event);
setWindowTitle(phrase(QStringLiteral("TITLE_WONDERS")));
selection = -1;
offscreenPaint();
}
void WondersDlg::resizeEvent(QResizeEvent *event)
{
BufferedDrawDlg::resizeEvent(event);