From 2980c3ca3737afaf39cc8a8595737f131adacf5d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 13 Jun 2017 21:53:58 +0300 Subject: Fix virtual member call in Window constructor. --- src/gui/widgets/window.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/window.cpp') diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 874a0ae14..5d48cfad3 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -230,7 +230,7 @@ Window::Window(const std::string &caption, } // Windows are invisible by default - setVisible(Visible_false); + setVisible(Visible_false, false); addWidgetListener(this); mForegroundColor = getThemeColor(ThemeColorId::WINDOW); @@ -238,6 +238,17 @@ Window::Window(const std::string &caption, setPalette(childPalette); } +void Window::postInit() +{ + if (mInit) + { + reportAlways("error: Window created with calling postInit() " + "more than once: %s", + mWindowName.c_str()); + } + mInit = true; +} + Window::~Window() { logger->log("Window::~Window(\"%s\")", getCaption().c_str()); -- cgit v1.2.3-60-g2f50