mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Merge branch 'fix_machine_name_conflicts' of https://github.com/fieldOfView/Cura
This commit is contained in:
commit
3c14545e08
1 changed files with 5 additions and 0 deletions
|
@ -30,6 +30,11 @@ class CuraStackBuilder:
|
|||
|
||||
machine_definition = definitions[0]
|
||||
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
|
||||
if registry.findContainers(id = name):
|
||||
name = registry.uniqueName(name)
|
||||
|
||||
new_global_stack = cls.createGlobalStack(
|
||||
new_stack_id = name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue