summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-18 21:26:49 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-19 15:12:22 +0300
commit74e429575a1ace40339e3a7c73250548aec85247 (patch)
tree077226742441d79a19c2b2cdf89b537d3b3ca33d
parent7db67f02a28449006a1fb872f82612fd9d89bb61 (diff)
downloadmanaplus-74e429575a1ace40339e3a7c73250548aec85247.tar.gz
manaplus-74e429575a1ace40339e3a7c73250548aec85247.tar.bz2
manaplus-74e429575a1ace40339e3a7c73250548aec85247.tar.xz
manaplus-74e429575a1ace40339e3a7c73250548aec85247.zip
move virtual member calls from serverdialog constuctor into postInit.
-rw-r--r--src/client.cpp1
-rw-r--r--src/gui/windows/serverdialog.cpp3
-rw-r--r--src/gui/windows/serverdialog.h2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 33b0ffbb0..4a22836c9 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1217,6 +1217,7 @@ int Client::gameExec()
mCurrentDialog = new ServerDialog(&mCurrentServer,
mConfigDir);
+ mCurrentDialog->postInit();
}
else
{
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index d1ec6f0df..a8895cad9 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -330,7 +330,10 @@ ServerDialog::ServerDialog(ServerInfo *const serverInfo,
addKeyListener(this);
loadWindowState();
+}
+void ServerDialog::postInit()
+{
setVisible(true);
mConnectButton->requestFocus();
diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h
index 95bcda706..31ad9609a 100644
--- a/src/gui/windows/serverdialog.h
+++ b/src/gui/windows/serverdialog.h
@@ -104,6 +104,8 @@ class ServerDialog final : public Window,
A_DELETE_COPY(ServerDialog)
+ void postInit() override;
+
/**
* Destructor
*/