Skip to content

Commit

Permalink
GUI2/Chatbox: fixed close button being shown for lobby tab when reloa…
Browse files Browse the repository at this point in the history
…ding log

Fixes #2992.
  • Loading branch information
Vultraz committed May 4, 2018
1 parent 9dc1dd4 commit 25228db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/widgets/chatbox.cpp
Expand Up @@ -95,11 +95,13 @@ void chatbox::finalize_setup()
void chatbox::load_log(std::map<std::string, chatroom_log>& log, bool show_lobby)
{
for(const auto& l : log) {
if(!show_lobby && l.first == "lobby" && !l.second.whisper) {
const bool is_lobby = l.first == "lobby";

if(!show_lobby && is_lobby && !l.second.whisper) {
continue;
}

find_or_create_window(l.first, l.second.whisper, true, true, l.second.log);
find_or_create_window(l.first, l.second.whisper, true, !is_lobby, l.second.log);
}

log_ = &log;
Expand Down

0 comments on commit 25228db

Please sign in to comment.