>From 2af00c8a19628b964b14038bef34d1652790a93e Mon Sep 17 00:00:00 2001 From: Gehad elrobey <[email protected]> Date: Sat, 22 Mar 2014 03:18:46 +0200 Subject: [PATCH] Changing the tags separator to space instead of tab
the Tab key that is used to separate between the tags and add a comma is replaced by space key so that you can tab between different fields when filling in a dive manually. Signed-off-by: Gehad elrobey <[email protected]> --- qt-ui/maintab.ui | 9 +++++++++ qt-ui/tagwidget.cpp | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui index 276c792..bc530f9 100644 --- a/qt-ui/maintab.ui +++ b/qt-ui/maintab.ui @@ -140,6 +140,9 @@ <property name="readOnly"> <bool>false</bool> </property> + <property name="tabChangesFocus"> + <bool>true</bool> + </property> </widget> </item> <item row="5" column="0"> @@ -161,6 +164,9 @@ <property name="readOnly"> <bool>false</bool> </property> + <property name="tabChangesFocus"> + <bool>true</bool> + </property> </widget> </item> <item row="7" column="0"> @@ -242,6 +248,9 @@ <verstretch>0</verstretch> </sizepolicy> </property> + <property name="tabChangesFocus"> + <bool>true</bool> + </property> <property name="minimumSize"> <size> <width>0</width> diff --git a/qt-ui/tagwidget.cpp b/qt-ui/tagwidget.cpp index a33bd55..a4e14aa 100644 --- a/qt-ui/tagwidget.cpp +++ b/qt-ui/tagwidget.cpp @@ -194,7 +194,7 @@ void TagWidget::keyPressEvent(QKeyEvent *e) return; case Qt::Key_Return: case Qt::Key_Enter: - case Qt::Key_Tab: + case Qt::Key_Space: /* * Fake the QLineEdit behaviour by simply * closing the QAbstractViewitem @@ -205,7 +205,7 @@ void TagWidget::keyPressEvent(QKeyEvent *e) popup->hide(); } } - if (e->key() == Qt::Key_Tab) { // let's pretend this is a comma instead + if (e->key() == Qt::Key_Space) { // let's pretend this is a comma instead QKeyEvent fakeEvent(e->type(), Qt::Key_Comma, e->modifiers(), QString(",")); GroupedLineEdit::keyPressEvent(&fakeEvent); } else { -- 1.8.3.2
_______________________________________________ subsurface mailing list [email protected] http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
