mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-27 12:51:07 -07:00
Also validate machine name in rename dialogue
Otherwise you could still circumvent the length limitation. Contributes to issue CURA-2692.
This commit is contained in:
parent
d33f6d2e44
commit
9f43a740a6
1 changed files with 2 additions and 0 deletions
|
|
@ -251,6 +251,8 @@ UM.ManagementPage
|
||||||
{
|
{
|
||||||
id: renameDialog;
|
id: renameDialog;
|
||||||
object: base.currentItem && base.currentItem.name ? base.currentItem.name : "";
|
object: base.currentItem && base.currentItem.name ? base.currentItem.name : "";
|
||||||
|
property var machine_name_validator: Cura.MachineNameValidator { }
|
||||||
|
validName: renameDialog.newName.match(renameDialog.machine_name_validator.machineNameRegex) != null;
|
||||||
onAccepted:
|
onAccepted:
|
||||||
{
|
{
|
||||||
Cura.MachineManager.renameMachine(base.currentItem.id, newName.trim());
|
Cura.MachineManager.renameMachine(base.currentItem.id, newName.trim());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue