From 3feb3ff102358390f11a032ac98870656cdd639a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 19 Oct 2013 15:01:42 +0300 Subject: move virtual member calls from worldselectdialog constructor into postInit. --- src/client.cpp | 1 + src/gui/windows/worldselectdialog.cpp | 4 ++++ src/gui/windows/worldselectdialog.h | 2 ++ 3 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/client.cpp b/src/client.cpp index 222322f22..946c4481b 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1309,6 +1309,7 @@ int Client::gameExec() else { mCurrentDialog = new WorldSelectDialog(worlds); + mCurrentDialog->postInit(); if (mOptions.chooseDefault) { static_cast(mCurrentDialog) diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp index 3d9581164..b3686ee10 100644 --- a/src/gui/windows/worldselectdialog.cpp +++ b/src/gui/windows/worldselectdialog.cpp @@ -120,6 +120,10 @@ WorldSelectDialog::WorldSelectDialog(Worlds worlds): addKeyListener(this); center(); +} + +void WorldSelectDialog::postInit() +{ setVisible(true); mChooseWorld->requestFocus(); } diff --git a/src/gui/windows/worldselectdialog.h b/src/gui/windows/worldselectdialog.h index d3107a807..6afaa25c8 100644 --- a/src/gui/windows/worldselectdialog.h +++ b/src/gui/windows/worldselectdialog.h @@ -52,6 +52,8 @@ class WorldSelectDialog final : public Window, public gcn::ActionListener, A_DELETE_COPY(WorldSelectDialog) + void postInit() override; + /** * Destructor. */ -- cgit v1.2.3-70-g09d2