From ccf9c1d17bef7457bb7842e42c7a70a539454d03 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 14 Jun 2015 19:51:26 +0300 Subject: Use CREATEWIDGET macro in npcselldialog. --- src/gui/windows/npcselldialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui/windows/npcselldialog.cpp b/src/gui/windows/npcselldialog.cpp index c1fdbe259..2645f4798 100644 --- a/src/gui/windows/npcselldialog.cpp +++ b/src/gui/windows/npcselldialog.cpp @@ -28,6 +28,7 @@ #include "gui/models/shopitems.h" +#include "gui/widgets/createwidget.h" #include "gui/widgets/shoplistbox.h" #include "gui/widgets/slider.h" @@ -62,7 +63,7 @@ void NpcSellDialog::sellAction(const ActionEvent &event) const ItemInfo &info = ItemDB::get(item->getId()); if (info.isProtected()) { - ConfirmDialog *const dialog = new ConfirmDialog( + ConfirmDialog *const dialog = CREATEWIDGETR(ConfirmDialog, // TRANSLATORS: sell confirmation header _("sell item"), // TRANSLATORS: sell confirmation message @@ -71,7 +72,6 @@ void NpcSellDialog::sellAction(const ActionEvent &event) SOUND_REQUEST, false, Modal_true); - dialog->postInit(); dialog->addActionListener(this); return; } -- cgit v1.2.3-60-g2f50