diff options
author | ChrisTerBeke <c.terbeke@ultimaker.com> | 2017-10-03 18:35:19 +0300 |
---|---|---|
committer | ChrisTerBeke <c.terbeke@ultimaker.com> | 2017-10-03 18:35:19 +0300 |
commit | 15d945a207d46150f3dd5602a4819395a51444bb (patch) | |
tree | 948a379182a8f094c24dec865ffb45777f28b606 /cura | |
parent | b0fa87231ca0cbfec877a5348586182dadc66016 (diff) | |
parent | 6dcb542e641271703607a62be91adea622ed1e08 (diff) |
Merge branch '3.0' of https://github.com/Ultimaker/Cura into 3.0
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) |