summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/windowmenu.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index f33fe3e87..e0bd1c843 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -239,10 +239,15 @@ void WindowMenu::addButton(const char *const text,
add(btn);
btn->setFocusable(false);
if (!visible)
+ {
btn->setVisible(false);
+ }
+ else
+ {
+ x += btn->getWidth() + 3;
+ h = btn->getHeight();
+ }
mButtons.push_back(btn);
- x += btn->getWidth() + 3;
- h = btn->getHeight();
mButtonNames[text] = btn;
}