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/net/tmwa/buysellhandler.cpp | 1 + src/net/tmwa/charserverhandler.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/buysellhandler.cpp b/src/net/tmwa/buysellhandler.cpp index e63559d20..28261579e 100644 --- a/src/net/tmwa/buysellhandler.cpp +++ b/src/net/tmwa/buysellhandler.cpp @@ -107,6 +107,7 @@ void BuySellHandler::processNpcBuy(Net::MessageIn &msg) sz += 1; const unsigned int n_items = (msg.getLength() - 4U) / sz; mBuyDialog = new BuyDialog(mNpcId); + mBuyDialog->postInit(); mBuyDialog->setMoney(PlayerInfo::getAttribute(Attributes::MONEY)); for (unsigned int k = 0; k < n_items; k++) diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index b33e0e4e2..970d6a9c6 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -518,14 +518,14 @@ void CharServerHandler::processCharDeleteFailed(Net::MessageIn &msg) unlockCharSelectDialog(); msg.readUInt8("error"); // TRANSLATORS: error message - new OkDialog(_("Error"), _("Failed to delete character."), + (new OkDialog(_("Error"), _("Failed to delete character."), // TRANSLATORS: ok dialog button _("OK"), DialogType::ERROR, Modal_true, ShowCenter_true, nullptr, - 260); + 260))->postInit(); BLOCK_END("CharServerHandler::processCharDeleteFailed") } -- cgit v1.2.3-70-g09d2