From 8780a2c4a0048db7f24b17b49266b12a6a64c3cd Mon Sep 17 00:00:00 2001 From: Joey de l'Arago Date: Mon, 12 Dec 2022 14:12:32 +0100 Subject: [PATCH] Move validators to top of file. CURA-9793 --- resources/qml/Settings/SettingTextField.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 366fd06517..d8e90e4951 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -14,6 +14,11 @@ SettingItem property string textBeforeEdit property bool textHasChanged property bool focusGainedByClick: false + + readonly property UM.IntValidator intValidator: UM.IntValidator {} + readonly property UM.FloatValidator floatValidator: UM.FloatValidator {} + readonly property UM.IntListValidator intListValidator: UM.IntListValidator {} + onFocusReceived: { textHasChanged = false; @@ -159,9 +164,6 @@ SettingItem // should be done as little as possible) clip: definition.type == "str" || definition.type == "[int]" - readonly property UM.IntValidator intValidator: UM.IntValidator {} - readonly property UM.FloatValidator floatValidator: UM.FloatValidator {} - readonly property UM.IntListValidator intListValidator: UM.IntListValidator {} validator: RegularExpressionValidator { regularExpression: