Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cura
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2016-10-28 15:50:07 +0300
committerJaime van Kessel <nallath@gmail.com>2016-10-28 15:50:07 +0300
commit78ab1f1a71c08f5fc51f2f2c0b055e1fc309466e (patch)
treeca5318055d15b62612109c2a059e471e87606fc0 /cura
parentaf10438277cf412563b41c536f999c3c05a20f20 (diff)
parent9f43a740a6a3146d32ef1684a69fa34a3c5a0f87 (diff)
Merge branch '2.3' of github.com:Ultimaker/Cura into 2.3
Diffstat (limited to 'cura')
-rw-r--r--cura/Settings/MachineNameValidator.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/cura/Settings/MachineNameValidator.py b/cura/Settings/MachineNameValidator.py
index d859e85343..34b6351144 100644
--- a/cura/Settings/MachineNameValidator.py
+++ b/cura/Settings/MachineNameValidator.py
@@ -28,7 +28,7 @@ class MachineNameValidator(QObject):
# special character, and that up to [machine_name_max_length / 12] times.
maximum_special_characters = int(machine_name_max_length / 12)
unescaped = r"[a-zA-Z0-9_\-\.\/]"
- self.machine_name_regex = r"((" + unescaped + "){0,12}|.){0," + str(maximum_special_characters) + r"}"
+ self.machine_name_regex = r"^((" + unescaped + "){0,12}|.){0," + str(maximum_special_characters) + r"}$"
validationChanged = pyqtSignal()
@@ -56,14 +56,11 @@ class MachineNameValidator(QObject):
def updateValidation(self, new_name):
is_valid = self.validate(new_name, 0)
if is_valid == QValidator.Acceptable:
- print("VALID")
self.validation_regex = "^.*$" #Matches anything.
else:
- print("BROKEN!")
self.validation_regex = "a^" #Never matches (unless you manage to get "a" before the start of the string... good luck).
self.validationChanged.emit()
@pyqtProperty("QRegExp", notify=validationChanged)
def machineNameRegex(self):
- print(self.machine_name_regex)
return QRegExp(self.machine_name_regex) \ No newline at end of file