mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Don't create abstract printers if visibility is set to false
CURA-11138
This commit is contained in:
parent
ce132e4c3f
commit
75feb5ae38
1 changed files with 5 additions and 1 deletions
|
@ -284,16 +284,20 @@ class CuraStackBuilder:
|
|||
abstract_machines = registry.findContainerStacks(id = abstract_machine_id)
|
||||
if abstract_machines:
|
||||
return cast(GlobalStack, abstract_machines[0])
|
||||
|
||||
definitions = registry.findDefinitionContainers(id=definition_id)
|
||||
|
||||
name = ""
|
||||
|
||||
if definitions:
|
||||
name = definitions[0].getName()
|
||||
|
||||
stack = cls.createMachine(abstract_machine_id, definition_id, show_warning_message=False)
|
||||
if not stack:
|
||||
return None
|
||||
|
||||
if not stack.getMetaDataEntry("visible", True):
|
||||
return None
|
||||
|
||||
stack.setName(name)
|
||||
|
||||
stack.setMetaDataEntry("is_abstract_machine", True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue