From 8847325cf8c16eea64a2e4f4e8173a0e2e021163 Mon Sep 17 00:00:00 2001 From: Ruben D Date: Sun, 26 Nov 2017 18:47:58 +0100 Subject: [PATCH] Remove limit on length for integer arrays The integer arrays were limited because the text in the text field is not properly clipped. I found a fix for that. Fixes #2802. --- resources/qml/Settings/SettingTextField.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index cdc0588940..64df60b132 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -1,5 +1,5 @@ -// Copyright (c) 2015 Ultimaker B.V. -// Uranium is released under the terms of the LGPLv3 or higher. +// Copyright (c) 2017 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 import QtQuick.Controls 1.2 @@ -154,7 +154,7 @@ SettingItem selectByMouse: true; - maximumLength: (definition.type == "[int]") ? 20 : (definition.type == "str") ? -1 : 10; + maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 10; validator: RegExpValidator { regExp: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : (definition.type == "float") ? /^-?[0-9]{0,9}[.,]?[0-9]{0,10}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry