diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-06 00:08:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-06 00:08:38 +0300 |
commit | 863ef6dc13fb3a7fb434ce173a84253f0c4559c5 (patch) | |
tree | 8e27d0ae9522e61c6805375cec35014bada1c1d6 /src/gui/popupmenu.cpp | |
parent | 44c92542331ea57553978e55585b5687d7034654 (diff) | |
download | ManaVerse-863ef6dc13fb3a7fb434ce173a84253f0c4559c5.tar.gz ManaVerse-863ef6dc13fb3a7fb434ce173a84253f0c4559c5.tar.bz2 ManaVerse-863ef6dc13fb3a7fb434ce173a84253f0c4559c5.tar.xz ManaVerse-863ef6dc13fb3a7fb434ce173a84253f0c4559c5.zip |
Allow hide yellow bar.
By default in new configurations yellow bar is hidden.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 6bd384132..e80158227 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -1951,11 +1951,31 @@ void PopupMenu::showPopup(const int x, const int y, const ProgressBar *const b) mBrowserBox->clearRows(); std::vector <ProgressBar*> bars = miniStatusWindow->getBars(); + ProgressBar *onlyBar = nullptr; + int cnt = 0; + + // search for alone visible bar + for (std::vector <ProgressBar*>::const_iterator it = bars.begin(), + it_end = bars.end(); it != it_end; ++it) + { + ProgressBar *const bar = *it; + if (!bar) + continue; + + if (bar->isVisible()) + { + cnt ++; + onlyBar = bar; + } + } + if (cnt > 1) + onlyBar = nullptr; + for (std::vector <ProgressBar*>::const_iterator it = bars.begin(), it_end = bars.end(); it != it_end; ++it) { ProgressBar *const bar = *it; - if (!bar || bar->getActionEventId() == "status bar") + if (!bar || bar == onlyBar) continue; if (bar->isVisible()) |