summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-19 12:37:55 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-19 15:12:22 +0300
commita259a5380ca980da4fcfb866777192231aa9f854 (patch)
tree3e582a1bfa031162c132622b26ee73f388a9c0f0
parentda34f018eb4e67452e314487cb547a8393afeff2 (diff)
downloadplus-a259a5380ca980da4fcfb866777192231aa9f854.tar.gz
plus-a259a5380ca980da4fcfb866777192231aa9f854.tar.bz2
plus-a259a5380ca980da4fcfb866777192231aa9f854.tar.xz
plus-a259a5380ca980da4fcfb866777192231aa9f854.zip
move virtual member calls from textcommandeditor constructor into postInit.
-rw-r--r--src/gui/popups/popupmenu.cpp2
-rw-r--r--src/gui/windows/textcommandeditor.cpp3
-rw-r--r--src/gui/windows/textcommandeditor.h2
3 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index ce96d2abd..daee76630 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -1341,7 +1341,7 @@ void PopupMenu::handleLink(const std::string &link,
}
else if (link == "edit spell" && mSpell)
{
- new TextCommandEditor(mSpell);
+ (new TextCommandEditor(mSpell))->postInit();
}
else if (link == "undress" && being)
{
diff --git a/src/gui/windows/textcommandeditor.cpp b/src/gui/windows/textcommandeditor.cpp
index e7bd8eb2c..da0eadfec 100644
--- a/src/gui/windows/textcommandeditor.cpp
+++ b/src/gui/windows/textcommandeditor.cpp
@@ -296,7 +296,10 @@ TextCommandEditor::TextCommandEditor(TextCommand *const command) :
reflowLayout(w);
center();
+}
+void TextCommandEditor::postInit()
+{
enableVisibleSound(true);
setVisible(true);
}
diff --git a/src/gui/windows/textcommandeditor.h b/src/gui/windows/textcommandeditor.h
index 1a1138b3a..cd080aebb 100644
--- a/src/gui/windows/textcommandeditor.h
+++ b/src/gui/windows/textcommandeditor.h
@@ -53,6 +53,8 @@ class TextCommandEditor final : public Window, public gcn::ActionListener
*/
~TextCommandEditor();
+ void postInit() override;
+
void action(const gcn::ActionEvent &event) override;
void scheduleDelete() override;