mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 21:13:58 -06:00
WIP: Simplify global stack and extruder stack activation and fixes
This commit is contained in:
parent
21c4753443
commit
c432d4ffbb
6 changed files with 14 additions and 21 deletions
|
@ -102,6 +102,7 @@ class CuraStackBuilder:
|
|||
variant_container = variant_container,
|
||||
material_container = material_container,
|
||||
quality_container = application.empty_quality_container,
|
||||
global_stack = new_global_stack,
|
||||
)
|
||||
new_extruder.setNextStack(new_global_stack)
|
||||
new_global_stack.addExtruder(new_extruder)
|
||||
|
@ -133,11 +134,11 @@ class CuraStackBuilder:
|
|||
@classmethod
|
||||
def createExtruderStack(cls, new_stack_id: str, extruder_definition: DefinitionContainerInterface, machine_definition_id: str,
|
||||
position: int,
|
||||
variant_container, material_container, quality_container) -> ExtruderStack:
|
||||
variant_container, material_container, quality_container, global_stack) -> ExtruderStack:
|
||||
from cura.CuraApplication import CuraApplication
|
||||
application = CuraApplication.getInstance()
|
||||
|
||||
stack = ExtruderStack(new_stack_id)
|
||||
stack = ExtruderStack(new_stack_id, parent = global_stack)
|
||||
stack.setName(extruder_definition.getName())
|
||||
stack.setDefinition(extruder_definition)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue