summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabbedarea.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-23 02:42:26 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-23 02:42:26 +0300
commita86324d5fb520823ecb35e828dfeccf9ac2bba81 (patch)
treea1b8fa4d37d718c28515e8ba6f4a0589094d1d49 /src/gui/widgets/tabbedarea.cpp
parent03e7901322461a881cc59fc321234e1efee0fa0e (diff)
downloadmv-a86324d5fb520823ecb35e828dfeccf9ac2bba81.tar.gz
mv-a86324d5fb520823ecb35e828dfeccf9ac2bba81.tar.bz2
mv-a86324d5fb520823ecb35e828dfeccf9ac2bba81.tar.xz
mv-a86324d5fb520823ecb35e828dfeccf9ac2bba81.zip
By default dont switch tabs by left/right keys.
Diffstat (limited to 'src/gui/widgets/tabbedarea.cpp')
-rw-r--r--src/gui/widgets/tabbedarea.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index b24ae32e5..5896af304 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -34,14 +34,15 @@
#include "debug.h"
-TabbedArea::TabbedArea()
- : gcn::TabbedArea(),
- mTabsWidth(0),
- mVisibleTabsWidth(0),
- mTabScrollIndex(0),
- mEnableScrollButtons(false),
- mRightMargin(0),
- mFollowDownScroll(false)
+TabbedArea::TabbedArea() :
+ gcn::TabbedArea(),
+ mTabsWidth(0),
+ mVisibleTabsWidth(0),
+ mTabScrollIndex(0),
+ mEnableScrollButtons(false),
+ mRightMargin(0),
+ mFollowDownScroll(false),
+ mBlockSwitching(true)
{
mWidgetContainer->setOpaque(false);
addWidgetListener(this);
@@ -482,7 +483,7 @@ void TabbedArea::removeAll()
void TabbedArea::keyPressed(gcn::KeyEvent& keyEvent)
{
- if (keyEvent.isConsumed() || !isFocused())
+ if (mBlockSwitching || keyEvent.isConsumed() || !isFocused())
return;
int actionId = static_cast<KeyEvent*>(&keyEvent)->getActionId();