From 9a03094bfd5af7ff6cddba726e13a75856885458 Mon Sep 17 00:00:00 2001 From: Joey de l'Arago Date: Thu, 8 Dec 2022 09:34:16 +0100 Subject: [PATCH] Stop the text field from updating if the text has not changed. This was causing the custom mode text boxes to be updated instantly. 0.0 -delete-> 0. -instant update -> 0.0 This is because the recommended mode text fields would update to "0." see that as a change from "0.0" and update the property. This triggered an update in the Custom mode textfield. CURA-9793 --- resources/qml/Widgets/SingleSettingTextField.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/qml/Widgets/SingleSettingTextField.qml b/resources/qml/Widgets/SingleSettingTextField.qml index 10bf283a11..1a8d7ae703 100644 --- a/resources/qml/Widgets/SingleSettingTextField.qml +++ b/resources/qml/Widgets/SingleSettingTextField.qml @@ -87,6 +87,12 @@ UM.TextField function parseValueUpdateSetting() { + if (propertyProvider.properties.value == text || parseInt(propertyProvide.properties.value) == parseInt(text)) + { + // Don't set the property value from the control. It already has the same value + return + } + if (propertyProvider && text != propertyProvider.properties.value) { updateSetting(text);