summaryrefslogtreecommitdiff
path: root/src/actions/actions.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-21 22:00:30 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-21 22:00:30 +0300
commit76dc498cd50fb5bc83b3d0a165df17781af35979 (patch)
tree6513853d484fa36e282afc2865e8e98f69100aeb /src/actions/actions.cpp
parentba307a72cb8bcfe068e362fab4a5e572d9ac65e9 (diff)
downloadmv-76dc498cd50fb5bc83b3d0a165df17781af35979.tar.gz
mv-76dc498cd50fb5bc83b3d0a165df17781af35979.tar.bz2
mv-76dc498cd50fb5bc83b3d0a165df17781af35979.tar.xz
mv-76dc498cd50fb5bc83b3d0a165df17781af35979.zip
Call postInit after each window creation.
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r--src/actions/actions.cpp12
1 files changed, 9 insertions, 3 deletions
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)
{