aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2019-08-28 15:30:35 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2019-08-28 13:32:47 +0000
commit217f0c0305ed57041d3375a5bb08ec6a255e0b89 (patch)
tree3aaf5ef19408f20b915f82df7d6e5a88ae9d9cce /share
parentd17840ba92f09eb7e524865e9a8bcbb2ed177d02 (diff)
QmlDesigner: Fix SpinBoxIndicator ghost input
* Fix SpinBoxIndicator not properly setting the pressedAndHeld flag * Rename sync function Task-number: QDS-885 Change-Id: I9b8aae051fc6c8b802bb6ab90d63faa0d985f962 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSpinBoxIndicator.qml10
1 files changed, 6 insertions, 4 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSpinBoxIndicator.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSpinBoxIndicator.qml
index 7cebe1cd26..0216bb20d9 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSpinBoxIndicator.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/RealSpinBoxIndicator.qml
@@ -46,16 +46,18 @@ Rectangle {
color: StudioTheme.Values.themeControlBackground
border.width: 0
- onEnabledChanged: invalidateEnabled()
+ onEnabledChanged: syncEnabled()
onRealEnabledChanged: {
- invalidateEnabled()
- if (spinBoxIndicator.realEnabled === false)
+ syncEnabled()
+ if (spinBoxIndicator.realEnabled === false) {
pressAndHoldTimer.stop()
+ spinBoxIndicatorMouseArea.pressedAndHeld = false
+ }
}
// This function is meant to synchronize enabled with realEnabled to avoid
// the internal logic messing with the actual state.
- function invalidateEnabled() {
+ function syncEnabled() {
spinBoxIndicator.enabled = spinBoxIndicator.realEnabled
}