summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-29 01:09:55 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-29 01:09:55 +0300
commit22b8f9c3d73e56e13c4b52b3b0e3d1b8017df28b (patch)
tree392646acb3d2814589e560e8f0914681c18a5730 /src/gui
parent29d003ad3b08f1b1b11c5df4f13e8f700892ea5f (diff)
downloadmanaverse-22b8f9c3d73e56e13c4b52b3b0e3d1b8017df28b.tar.gz
manaverse-22b8f9c3d73e56e13c4b52b3b0e3d1b8017df28b.tar.bz2
manaverse-22b8f9c3d73e56e13c4b52b3b0e3d1b8017df28b.tar.xz
manaverse-22b8f9c3d73e56e13c4b52b3b0e3d1b8017df28b.zip
Not allow unpress selected button in tabstrip.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/tabstrip.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/widgets/tabstrip.cpp b/src/gui/widgets/tabstrip.cpp
index 879da6210..0be26c302 100644
--- a/src/gui/widgets/tabstrip.cpp
+++ b/src/gui/widgets/tabstrip.cpp
@@ -58,8 +58,9 @@ void TabStrip::action(const ActionEvent &event)
WidgetGroup::action(event);
if (event.getSource())
{
- const Widget *const widget = event.getSource();
- if (static_cast<const Button*>(widget)->isPressed2())
+ Widget *const widget = event.getSource();
+ Button *const button = static_cast<Button*>(widget);
+ if (button->isPressed2())
{
FOR_EACH (WidgetListConstIterator, iter, mWidgets)
{
@@ -70,5 +71,9 @@ void TabStrip::action(const ActionEvent &event)
}
}
}
+ else
+ {
+ button->setPressed(true);
+ }
}
}