summaryrefslogtreecommitdiff
path: root/src/gui/windows/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-17 22:05:53 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-19 15:12:17 +0300
commit94273f426318994df784cf85c0c18a817f913a8d (patch)
treed374772666277200afff6d28471cef3c0b7fe999 /src/gui/windows/chatwindow.cpp
parentfe189677b7596b3d0dbd7a2943fda37a3e5cd6a8 (diff)
downloadmv-94273f426318994df784cf85c0c18a817f913a8d.tar.gz
mv-94273f426318994df784cf85c0c18a817f913a8d.tar.bz2
mv-94273f426318994df784cf85c0c18a817f913a8d.tar.xz
mv-94273f426318994df784cf85c0c18a817f913a8d.zip
use postInit in ChatWindow.
Diffstat (limited to 'src/gui/windows/chatwindow.cpp')
-rw-r--r--src/gui/windows/chatwindow.cpp14
1 files changed, 9 insertions, 5 deletions
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;