From 217f0c0305ed57041d3375a5bb08ec6a255e0b89 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Wed, 28 Aug 2019 15:30:35 +0200 Subject: 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 --- .../imports/StudioControls/RealSpinBoxIndicator.qml | 10 ++++++---- 1 file 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 } -- cgit v1.2.3