From 76dc498cd50fb5bc83b3d0a165df17781af35979 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 21 May 2015 22:00:30 +0300 Subject: Call postInit after each window creation. --- src/gui/dialogsmanager.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gui/dialogsmanager.cpp') diff --git a/src/gui/dialogsmanager.cpp b/src/gui/dialogsmanager.cpp index 9d2bcb057..eab8c7387 100644 --- a/src/gui/dialogsmanager.cpp +++ b/src/gui/dialogsmanager.cpp @@ -101,7 +101,7 @@ Window *DialogsManager::openErrorDialog(const std::string &header, { if (settings.supportUrl.empty() || config.getBoolValue("hidesupport")) { - return new OkDialog(header, message, + OkDialog *const dialog = new OkDialog(header, message, // TRANSLATORS: ok dialog button _("Close"), DialogType::ERROR, @@ -109,6 +109,8 @@ Window *DialogsManager::openErrorDialog(const std::string &header, ShowCenter_true, nullptr, 260); + dialog->postInit(); + return dialog; } else { @@ -136,6 +138,7 @@ void DialogsManager::playerDeath() ShowCenter_true, nullptr, 260); + deathNotice->postInit(); deathNotice->addActionListener(&postDeathListener); } } @@ -167,6 +170,7 @@ void DialogsManager::attributeChanged(const int id, ShowCenter_true, nullptr, 260); + weightNotice->postInit(); weightNotice->addActionListener( &weightListener); } @@ -186,6 +190,7 @@ void DialogsManager::attributeChanged(const int id, ShowCenter_true, nullptr, 260); + weightNotice->postInit(); weightNotice->addActionListener( &weightListener); } -- cgit v1.2.3-60-g2f50