diff options
author | Fedja Beader <fedja@protonmail.ch> | 2024-05-16 13:14:34 +0000 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-05-16 13:14:34 +0000 |
commit | 95684834ecb45261da1640a4ad8143653698b192 (patch) | |
tree | b0f6da9e6729082ac40812fbb5815109673efd67 /src/gui/widgets/tabs | |
parent | 99f361699e1c8bbc1e69f4d199863b836b3528a3 (diff) | |
download | mv-95684834ecb45261da1640a4ad8143653698b192.tar.gz mv-95684834ecb45261da1640a4ad8143653698b192.tar.bz2 mv-95684834ecb45261da1640a4ad8143653698b192.tar.xz mv-95684834ecb45261da1640a4ad8143653698b192.zip |
Refactor loadFromLogFile calls into ChatTab contructor
This has the side effect that now #Debug history is also loaded.
****
mana/plus!84
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r-- | src/gui/widgets/tabs/chat/battletab.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabs/chat/chattab.cpp | 3 |
2 files changed, 3 insertions, 2 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() |