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/actions/actions.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/actions') diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 7121b138d..938b0c840 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -143,14 +143,14 @@ static int uploadUpdate(void *ptr, else { // TRANSLATORS: file uploaded message - new OkDialog(_("File uploaded"), str, + (new OkDialog(_("File uploaded"), str, // TRANSLATORS: ok dialog button _("OK"), DialogType::OK, Modal_true, ShowCenter_false, nullptr, - 260); + 260))->postInit();; } } } @@ -703,9 +703,14 @@ impHandler(talk) return false; if (being->canTalk()) + { being->talkTo(); + } else if (being->getType() == ActorType::Player) - new BuySellDialog(being->getName()); + { + BuySellDialog *const dialog = new BuySellDialog(being->getName()); + dialog->postInit(); + } return true; } @@ -1377,6 +1382,7 @@ impHandler0(testSdlFont) impHandler0(createItems) { BuyDialog *const dialog = new BuyDialog(); + dialog->postInit(); const ItemDB::ItemInfos &items = ItemDB::getItemInfos(); FOR_EACH (ItemDB::ItemInfos::const_iterator, it, items) { -- cgit v1.2.3-60-g2f50