forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Thomas Hartmann
parent
d17840ba92
commit
217f0c0305
@@ -46,16 +46,18 @@ Rectangle {
|
|||||||
color: StudioTheme.Values.themeControlBackground
|
color: StudioTheme.Values.themeControlBackground
|
||||||
border.width: 0
|
border.width: 0
|
||||||
|
|
||||||
onEnabledChanged: invalidateEnabled()
|
onEnabledChanged: syncEnabled()
|
||||||
onRealEnabledChanged: {
|
onRealEnabledChanged: {
|
||||||
invalidateEnabled()
|
syncEnabled()
|
||||||
if (spinBoxIndicator.realEnabled === false)
|
if (spinBoxIndicator.realEnabled === false) {
|
||||||
pressAndHoldTimer.stop()
|
pressAndHoldTimer.stop()
|
||||||
|
spinBoxIndicatorMouseArea.pressedAndHeld = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function is meant to synchronize enabled with realEnabled to avoid
|
// This function is meant to synchronize enabled with realEnabled to avoid
|
||||||
// the internal logic messing with the actual state.
|
// the internal logic messing with the actual state.
|
||||||
function invalidateEnabled() {
|
function syncEnabled() {
|
||||||
spinBoxIndicator.enabled = spinBoxIndicator.realEnabled
|
spinBoxIndicator.enabled = spinBoxIndicator.realEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user