summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp22
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())