From 4d6fd10b94d9c4fb2949272ffe1de1300f33405b Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sun, 19 Apr 2009 11:47:28 -0600 Subject: Make /query switch to the new tab --- src/gui/chat.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gui/chat.cpp') diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 7faf9bda..54b388db 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -454,7 +454,7 @@ void ChatWindow::whisper(const std::string &nick, std::string mes, bool own) } } -ChatTab *ChatWindow::addWhisperTab(const std::string &nick) +ChatTab *ChatWindow::addWhisperTab(const std::string &nick, bool switchTo) { std::string playerName = player_node->getName(); std::string tempNick = nick; @@ -465,5 +465,9 @@ ChatTab *ChatWindow::addWhisperTab(const std::string &nick) if (mWhispers[tempNick] || tempNick.compare(playerName) == 0) return NULL; - return mWhispers[tempNick] = new WhisperTab(nick); + ChatTab *ret = mWhispers[tempNick] = new WhisperTab(nick); + + mChatTabs->setSelectedTab(ret); + + return ret; } -- cgit v1.2.3-70-g09d2