summaryrefslogtreecommitdiff
path: root/src
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
parent29d003ad3b08f1b1b11c5df4f13e8f700892ea5f (diff)
downloadplus-22b8f9c3d73e56e13c4b52b3b0e3d1b8017df28b.tar.gz
plus-22b8f9c3d73e56e13c4b52b3b0e3d1b8017df28b.tar.bz2
plus-22b8f9c3d73e56e13c4b52b3b0e3d1b8017df28b.tar.xz
plus-22b8f9c3d73e56e13c4b52b3b0e3d1b8017df28b.zip
Not allow unpress selected button in tabstrip.
Diffstat (limited to 'src')
-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);
+ }
}
}