From 94273f426318994df784cf85c0c18a817f913a8d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 17 Oct 2013 22:05:53 +0300 Subject: use postInit in ChatWindow. --- src/gui/windows/chatwindow.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/gui/windows/chatwindow.cpp') diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 9a7a348c8..ca74e1765 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -271,10 +271,6 @@ ChatWindow::ChatWindow(): mColorPicker->addActionListener(this); mColorPicker->setSelected(mChatColor); - add(mChatTabs); - add(mChatInput); - add(mColorPicker); - loadWindowState(); mColorPicker->setPosition(this->getWidth() - mColorPicker->getWidth() @@ -314,6 +310,14 @@ ChatWindow::~ChatWindow() mColorListModel = nullptr; } +void ChatWindow::postInit() +{ + add(mChatTabs); + add(mChatInput); + add(mColorPicker); + updateVisibility(); +} + void ChatWindow::loadCommandsFile(const std::string &name) { StringVect list; @@ -1120,7 +1124,7 @@ WhisperTab *ChatWindow::addWhisperTab(const std::string &nick, toLower(tempNick); const TabMap::const_iterator i = mWhispers.find(tempNick); - WhisperTab *ret; + WhisperTab *ret = nullptr; if (tempNick.compare(playerName) == 0) return nullptr; -- cgit v1.2.3-70-g09d2