diff options
-rw-r--r-- | src/client.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/registerdialog.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/registerdialog.h | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp index 0448160f4..33b0ffbb0 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1591,6 +1591,7 @@ int Client::gameExec() case STATE_REGISTER: logger->log1("State: REGISTER"); mCurrentDialog = new RegisterDialog(&loginData); + mCurrentDialog->postInit(); break; case STATE_REGISTER_ATTEMPT: diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp index 841b3768f..d0d504f8a 100644 --- a/src/gui/windows/registerdialog.cpp +++ b/src/gui/windows/registerdialog.cpp @@ -154,6 +154,10 @@ RegisterDialog::RegisterDialog(LoginData *const data) : mConfirmField->addActionListener(this); center(); +} + +void RegisterDialog::postInit() +{ setVisible(true); mUserField->requestFocus(); mUserField->setCaretPosition(static_cast<unsigned>( diff --git a/src/gui/windows/registerdialog.h b/src/gui/windows/registerdialog.h index 7d2156f32..e4c848a6c 100644 --- a/src/gui/windows/registerdialog.h +++ b/src/gui/windows/registerdialog.h @@ -77,6 +77,8 @@ class RegisterDialog final : public Window, */ ~RegisterDialog(); + void postInit(); + /** * Called when receiving actions from the widgets. */ |