From 22b8f9c3d73e56e13c4b52b3b0e3d1b8017df28b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 29 Sep 2014 01:09:55 +0300 Subject: Not allow unpress selected button in tabstrip. --- src/gui/widgets/tabstrip.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets') 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(widget)->isPressed2()) + Widget *const widget = event.getSource(); + Button *const button = static_cast(widget); + if (button->isPressed2()) { FOR_EACH (WidgetListConstIterator, iter, mWidgets) { @@ -70,5 +71,9 @@ void TabStrip::action(const ActionEvent &event) } } } + else + { + button->setPressed(true); + } } } -- cgit v1.2.3-70-g09d2