summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
authorTametomo <irarice@gmail.com>2009-05-15 14:17:31 -0600
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2010-02-14 20:54:03 +0100
commit1ddc4476d74bfb61c80dd72123a94187f872dfdd (patch)
tree767b7a5a8ea2919ca68b3cb62da0ff6a59e60249 /src/gui/widgets/tabbedarea.cpp
parent9ddc6cc057798a3d6898516c76960d4a5611ba1c (diff)
downloadmana-client-1ddc4476d74bfb61c80dd72123a94187f872dfdd.tar.gz
mana-client-1ddc4476d74bfb61c80dd72123a94187f872dfdd.tar.bz2
mana-client-1ddc4476d74bfb61c80dd72123a94187f872dfdd.tar.xz
mana-client-1ddc4476d74bfb61c80dd72123a94187f872dfdd.zip
Fixed TabbedAreas stealing click focus from their children widgets.
Signed-off-by: Tametomo <irarice@gmail.com>
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r--src/gui/widgets/tabbedarea.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index c0d070cf..970a5cb1 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -156,6 +156,19 @@ void TabbedArea::logic()
logicChildren();
}
+void TabbedArea::mousePressed(gcn::MouseEvent &mouseEvent)
+{
+ if (mouseEvent.getButton() == gcn::MouseEvent::LEFT)
+ {
+ gcn::Widget *widget = mTabContainer->getWidgetAt(mouseEvent.getX(),
+ mouseEvent.getY());
+ gcn::Tab *tab = dynamic_cast<gcn::Tab*>(widget);
+
+ if (tab)
+ setSelectedTab(tab);
+ }
+}
+
void TabbedArea::setSelectedTab(gcn::Tab *tab)
{
gcn::TabbedArea::setSelectedTab(tab);