diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-15 01:30:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-15 01:30:24 +0300 |
commit | 1c9df7b5139f80a85333f9ab88a9500381be1690 (patch) | |
tree | 91254686697a56a76889c672863ebaadecc2605f /src/gui/windows/setup.cpp | |
parent | c3b87f283a5a99ed8bac513c516bc5a184406391 (diff) | |
download | mv-1c9df7b5139f80a85333f9ab88a9500381be1690.tar.gz mv-1c9df7b5139f80a85333f9ab88a9500381be1690.tar.bz2 mv-1c9df7b5139f80a85333f9ab88a9500381be1690.tar.xz mv-1c9df7b5139f80a85333f9ab88a9500381be1690.zip |
Fix unloading mods setting tab if change character or network error.
Diffstat (limited to 'src/gui/windows/setup.cpp')
-rw-r--r-- | src/gui/windows/setup.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gui/windows/setup.cpp b/src/gui/windows/setup.cpp index 5ba27f23c..d0ecc2d6d 100644 --- a/src/gui/windows/setup.cpp +++ b/src/gui/windows/setup.cpp @@ -203,6 +203,7 @@ void Setup::setInGame(const bool inGame) void Setup::externalUpdate() { + unloadModTab(); mModsTab = new Setup_Mods(this); mTabs.push_back(mModsTab); mPanel->addTab(mModsTab->getName(), mModsTab); @@ -213,13 +214,8 @@ void Setup::externalUpdate() } } -void Setup::externalUnload() +void Setup::unloadModTab() { - FOR_EACH (std::list<SetupTab*>::const_iterator, it, mTabs) - { - if (*it) - (*it)->externalUnloaded(); - } if (mModsTab) { mTabs.remove(mModsTab); @@ -230,6 +226,16 @@ void Setup::externalUnload() } } +void Setup::externalUnload() +{ + FOR_EACH (std::list<SetupTab*>::const_iterator, it, mTabs) + { + if (*it) + (*it)->externalUnloaded(); + } + unloadModTab(); +} + void Setup::registerWindowForReset(Window *const window) { mWindowsToReset.push_back(window); |