From 35e551f6a0a7836520c66f523c37a4952a3e5c34 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 18 Oct 2013 00:02:21 +0300 Subject: move virtual member calls from debugwindow constuctor into postInit. --- src/game.cpp | 1 + src/gui/windows/debugwindow.cpp | 6 +++++- src/gui/windows/debugwindow.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game.cpp b/src/game.cpp index 415f71bec..61fa1dddf 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -220,6 +220,7 @@ static void createGuiWindows() skillDialog = new SkillDialog; minimap = new Minimap; debugWindow = new DebugWindow; + debugWindow->postInit(); itemShortcutWindow = new ShortcutWindow( "ItemShortcut", "items.xml", 83, 460); diff --git a/src/gui/windows/debugwindow.cpp b/src/gui/windows/debugwindow.cpp index 24a77a402..cc9003b9a 100644 --- a/src/gui/windows/debugwindow.cpp +++ b/src/gui/windows/debugwindow.cpp @@ -73,7 +73,6 @@ DebugWindow::DebugWindow() : mTabs->addTab(std::string(_("Net")), mNetWidget); mTabs->setDimension(gcn::Rectangle(0, 0, 600, 300)); - add(mTabs); const int w = mDimension.width; const int h = mDimension.height; @@ -94,6 +93,11 @@ DebugWindow::~DebugWindow() mNetWidget = nullptr; } +void DebugWindow::postInit() +{ + add(mTabs); +} + void DebugWindow::slowLogic() { BLOCK_START("DebugWindow::slowLogic") diff --git a/src/gui/windows/debugwindow.h b/src/gui/windows/debugwindow.h index cd76c7a76..35c7df651 100644 --- a/src/gui/windows/debugwindow.h +++ b/src/gui/windows/debugwindow.h @@ -138,6 +138,7 @@ class DebugWindow final : public Window ~DebugWindow(); + void postInit(); /** * Logic (updates components' size and infos) */ -- cgit v1.2.3-70-g09d2