diff options
author | Tametomo <irarice@gmail.com> | 2009-05-21 14:18:15 -0600 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-14 20:54:03 +0100 |
commit | 2bb83523cd72c030aaa37c0be2f488e395fbc886 (patch) | |
tree | 8955100619e7e2cae267cb6b7d2719eccf36312f /src/gui | |
parent | 9c48d5f4d73e9810339c4959bea245020b4255c3 (diff) | |
download | mana-client-2bb83523cd72c030aaa37c0be2f488e395fbc886.tar.gz mana-client-2bb83523cd72c030aaa37c0be2f488e395fbc886.tar.bz2 mana-client-2bb83523cd72c030aaa37c0be2f488e395fbc886.tar.xz mana-client-2bb83523cd72c030aaa37c0be2f488e395fbc886.zip |
Make sure the tabbed area gets focus set on it when one of its tabs is
pressed by the mouse.
Signed-off-by: Tametomo <irarice@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/tabbedarea.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 970a5cb1..5e0807e6 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -158,6 +158,9 @@ void TabbedArea::logic() void TabbedArea::mousePressed(gcn::MouseEvent &mouseEvent) { + if (mouseEvent.isConsumed()) + return; + if (mouseEvent.getButton() == gcn::MouseEvent::LEFT) { gcn::Widget *widget = mTabContainer->getWidgetAt(mouseEvent.getX(), @@ -165,7 +168,10 @@ void TabbedArea::mousePressed(gcn::MouseEvent &mouseEvent) gcn::Tab *tab = dynamic_cast<gcn::Tab*>(widget); if (tab) + { setSelectedTab(tab); + requestFocus(); + } } } |