mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 10:47:49 -06:00
Naming of new machines now uses correct ordering again
CURA-4408
This commit is contained in:
parent
a3eae31982
commit
bff3a5bb23
1 changed files with 3 additions and 8 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue