From 71d7483a1d35a7068c456dfe6d3c0e54f1ae71a3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 17 Oct 2013 21:33:53 +0300 Subject: add postinit function into window. use postinit for call virtual functions in charselectdialog. --- src/gui/windows/charselectdialog.cpp | 8 ++++++-- src/gui/windows/charselectdialog.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/gui/windows') diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index 1c960b11c..d99b973b3 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -188,8 +188,6 @@ CharSelectDialog::CharSelectDialog(LoginData *const data): } addKeyListener(this); center(); - setVisible(true); - requestFocus(); Net::getCharServerHandler()->setCharSelectDialog(this); mCharacterView->show(0); @@ -201,6 +199,12 @@ CharSelectDialog::~CharSelectDialog() Net::getCharServerHandler()->clear(); } +void CharSelectDialog::postInit() +{ + setVisible(true); + requestFocus(); +} + void CharSelectDialog::action(const gcn::ActionEvent &event) { // Check if a button of a character was pressed diff --git a/src/gui/windows/charselectdialog.h b/src/gui/windows/charselectdialog.h index 705cb831c..1a4eeb4ac 100644 --- a/src/gui/windows/charselectdialog.h +++ b/src/gui/windows/charselectdialog.h @@ -90,6 +90,8 @@ class CharSelectDialog final : public Window, void updateState(); + void postInit(); + private: void attemptCharacterDelete(const int index); -- cgit v1.2.3-70-g09d2