aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2020-09-09 15:37:14 +0200
committerHenning Gründl <henning.gruendl@qt.io>2020-09-11 09:47:38 +0000
commit3afc21052f29f1ee2901c9fc3596119c9348d0b4 (patch)
tree694d0b106e1e10b5a6e445ce135cd1ae9ef17d25
parent0f9010d381d9defb7597f28186b9e10d3dd3eae1 (diff)
QmlDesigner: Fix unintentional item reordering
Fix reordering of items in the Navigator if using shortcuts on a SpinBox in the Property Editor. Task-number: QDS-2738 Change-Id: Ia12d2d072c36fbb32156c9729cffd828e8747b28 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSpinBoxInput.qml5
1 files changed, 5 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSpinBoxInput.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSpinBoxInput.qml
index 72a713c282..edeeaf9fd2 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSpinBoxInput.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSpinBoxInput.qml
@@ -128,6 +128,11 @@ TextInput {
}
}
+ // Ensure that we get Up and Down key press events first
+ Keys.onShortcutOverride: {
+ event.accepted = (event.key === Qt.Key_Up || event.key === Qt.Key_Down)
+ }
+
TapHandler {
id: tapHandler
acceptedDevices: PointerDevice.Mouse