summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/tabs/chat/battletab.cpp2
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp3
-rw-r--r--src/gui/windows/chatwindow.cpp4
3 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/widgets/tabs/chat/battletab.cpp b/src/gui/widgets/tabs/chat/battletab.cpp
index 5dd5ff987..9fa18e945 100644
--- a/src/gui/widgets/tabs/chat/battletab.cpp
+++ b/src/gui/widgets/tabs/chat/battletab.cpp
@@ -36,8 +36,6 @@ BattleTab::BattleTab(const Widget2 *const widget) :
ChatTab(widget, _("Battle"), "", "#Battle", ChatTabType::BATTLE)
{
setTabColors(ThemeColorId::BATTLE_CHAT_TAB);
- if (config.getBoolValue("showChatHistory"))
- loadFromLogFile("#Battle");
}
BattleTab::~BattleTab()
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp
index ec9042694..9809287d2 100644
--- a/src/gui/widgets/tabs/chat/chattab.cpp
+++ b/src/gui/widgets/tabs/chat/chattab.cpp
@@ -97,6 +97,9 @@ ChatTab::ChatTab(const Widget2 *const widget,
if (chatWindow != nullptr)
chatWindow->addTab(this);
mTextOutput->updateSize(true);
+
+ if (config.getBoolValue("showChatHistory"))
+ loadFromLogFile(logName);
}
ChatTab::~ChatTab()
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index a3b777655..15363883f 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -1246,8 +1246,6 @@ WhisperTab *ChatWindow::addWhisperTab(const std::string &caption,
if ((gui != nullptr) && !playerRelations.isGoodName(nick))
ret->setLabelFont(gui->getSecureFont());
mWhispers[tempNick] = ret;
- if (config.getBoolValue("showChatHistory"))
- ret->loadFromLogFile(nick);
}
if (switchTo)
@@ -1330,8 +1328,6 @@ ChatTab *ChatWindow::addChannelTab(const std::string &name,
ret = new ChannelTab(this, name);
mChannels[tempName] = ret;
ret->setAllowHighlight(false);
- if (config.getBoolValue("showChatHistory"))
- ret->loadFromLogFile(name);
}
if (switchTo)