diff options
author | Jaime van Kessel <nallath@gmail.com> | 2017-10-03 14:16:04 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2017-10-03 14:16:04 +0300 |
commit | bff3a5bb23c90eb24ccae46606baac97ce1809ee (patch) | |
tree | d0342d47946348267bb758e7dfd2604a9b7c3489 /cura | |
parent | a3eae3198235f6be2a0cb7f2f4bed6cf1142a2e2 (diff) |
Naming of new machines now uses correct ordering again
CURA-4408
Diffstat (limited to 'cura')
-rw-r--r-- | cura/Settings/CuraStackBuilder.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/cura/Settings/CuraStackBuilder.py b/cura/Settings/CuraStackBuilder.py index 7a48b1657e..09815da319 100644 --- a/cura/Settings/CuraStackBuilder.py +++ b/cura/Settings/CuraStackBuilder.py @@ -29,7 +29,8 @@ class CuraStackBuilder: return None machine_definition = definitions[0] - generated_name = registry.createUniqueName("machine", "", machine_definition.name, machine_definition.name) + + generated_name = registry.createUniqueName("machine", "", name, machine_definition.name) # Make sure the new name does not collide with any definition or (quality) profile # createUniqueName() only looks at other stacks, but not at definitions or quality profiles # Note that we don't go for uniqueName() immediately because that function matches with ignore_case set to true @@ -44,13 +45,7 @@ class CuraStackBuilder: variant = "default", ) - # after creating a global stack can be set custom defined name - if name != generated_name: - name = registry.createUniqueName("machine", "", name, machine_definition.name) - if registry.findContainers(id = name): - name = registry.uniqueName(name) - - new_global_stack.setName(name) + new_global_stack.setName(generated_name) for extruder_definition in registry.findDefinitionContainers(machine = machine_definition.id): position = extruder_definition.getMetaDataEntry("position", None) |