summaryrefslogtreecommitdiff
path: root/src/gui/windows/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-23 17:11:15 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-23 17:11:15 +0300
commit5d8efa68f4e913ec2b25f41d4607d582efaa2ac5 (patch)
tree7f0cf6c2f89915e3d6e2354a0ff33bffbb229707 /src/gui/windows/chatwindow.cpp
parent35e14007fe44877b160c48db1d4106eba6306859 (diff)
downloadplus-5d8efa68f4e913ec2b25f41d4607d582efaa2ac5.tar.gz
plus-5d8efa68f4e913ec2b25f41d4607d582efaa2ac5.tar.bz2
plus-5d8efa68f4e913ec2b25f41d4607d582efaa2ac5.tar.xz
plus-5d8efa68f4e913ec2b25f41d4607d582efaa2ac5.zip
Fix ignore all whispers chat command.
Diffstat (limited to 'src/gui/windows/chatwindow.cpp')
-rw-r--r--src/gui/windows/chatwindow.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index eb14628ea..87e6c5b3c 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -572,16 +572,18 @@ void ChatWindow::ignoreAllWhispers()
iter != mWhispers.end();
++ iter)
{
- const WhisperTab *const tab = dynamic_cast<const WhisperTab* const>(
+ WhisperTab *const tab = dynamic_cast<WhisperTab* const>(
iter->second);
- if (tab && player_relations.getRelation(tab->getNick())
- != PlayerRelation::IGNORED)
+ if (tab)
{
- player_relations.setRelation(tab->getNick(),
- PlayerRelation::IGNORED);
+ if (player_relations.getRelation(tab->getNick())
+ != PlayerRelation::IGNORED)
+ {
+ player_relations.setRelation(tab->getNick(),
+ PlayerRelation::IGNORED);
+ }
+ tab->handleCommand("close", "");
}
-
- delete2(iter->second)
}
}