diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-19 12:44:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-19 15:12:22 +0300 |
commit | d5bd11b08e4c49a22b40834c0607e3c9927aecd1 (patch) | |
tree | 5480ef3be37dd680a5ba6a0b20224711e3e56233 /src/gui/windows/textdialog.cpp | |
parent | a259a5380ca980da4fcfb866777192231aa9f854 (diff) | |
download | manaverse-d5bd11b08e4c49a22b40834c0607e3c9927aecd1.tar.gz manaverse-d5bd11b08e4c49a22b40834c0607e3c9927aecd1.tar.bz2 manaverse-d5bd11b08e4c49a22b40834c0607e3c9927aecd1.tar.xz manaverse-d5bd11b08e4c49a22b40834c0607e3c9927aecd1.zip |
move virtual member calls from textdialog constructor into postInit.
Diffstat (limited to 'src/gui/windows/textdialog.cpp')
-rw-r--r-- | src/gui/windows/textdialog.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/windows/textdialog.cpp b/src/gui/windows/textdialog.cpp index 3f62cef08..92cfa46d2 100644 --- a/src/gui/windows/textdialog.cpp +++ b/src/gui/windows/textdialog.cpp @@ -78,7 +78,10 @@ TextDialog::TextDialog(const std::string &title, const std::string &msg, { reflowLayout(static_cast<int>(textLabel->getWidth() + 20)); } +} +void TextDialog::postInit() +{ if (getParent()) { setLocationRelativeTo(getParent()); @@ -86,9 +89,9 @@ TextDialog::TextDialog(const std::string &title, const std::string &msg, } setVisible(true); requestModalFocus(); - if (isPassword) + if (mPasswordField) mPasswordField->requestFocus(); - else + else if (mTextField) mTextField->requestFocus(); instances++; |