mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Fix extruder stacks list handling in profile models
CURA-4404
This commit is contained in:
parent
0eeded7930
commit
d89f027458
2 changed files with 12 additions and 4 deletions
|
@ -100,8 +100,12 @@ class ProfilesModel(InstanceContainersModel):
|
||||||
extruder_stacks = extruder_manager.getActiveExtruderStacks()
|
extruder_stacks = extruder_manager.getActiveExtruderStacks()
|
||||||
if multiple_extrusion:
|
if multiple_extrusion:
|
||||||
# Place the active extruder at the front of the list.
|
# Place the active extruder at the front of the list.
|
||||||
|
if active_extruder in extruder_stacks:
|
||||||
extruder_stacks.remove(active_extruder)
|
extruder_stacks.remove(active_extruder)
|
||||||
extruder_stacks = [active_extruder] + extruder_stacks
|
new_extruder_stacks = []
|
||||||
|
if active_extruder is not None:
|
||||||
|
new_extruder_stacks = [active_extruder]
|
||||||
|
extruder_stacks = new_extruder_stacks + extruder_stacks
|
||||||
|
|
||||||
# Get a list of usable/available qualities for this machine and material
|
# Get a list of usable/available qualities for this machine and material
|
||||||
qualities = QualityManager.getInstance().findAllUsableQualitiesForMachineAndExtruders(global_container_stack,
|
qualities = QualityManager.getInstance().findAllUsableQualitiesForMachineAndExtruders(global_container_stack,
|
||||||
|
|
|
@ -33,8 +33,12 @@ class UserProfilesModel(ProfilesModel):
|
||||||
extruder_stacks = extruder_manager.getActiveExtruderStacks()
|
extruder_stacks = extruder_manager.getActiveExtruderStacks()
|
||||||
if multiple_extrusion:
|
if multiple_extrusion:
|
||||||
# Place the active extruder at the front of the list.
|
# Place the active extruder at the front of the list.
|
||||||
|
if active_extruder in extruder_stacks:
|
||||||
extruder_stacks.remove(active_extruder)
|
extruder_stacks.remove(active_extruder)
|
||||||
extruder_stacks = [active_extruder] + extruder_stacks
|
new_extruder_stacks = []
|
||||||
|
if active_extruder is not None:
|
||||||
|
new_extruder_stacks = [active_extruder]
|
||||||
|
extruder_stacks = new_extruder_stacks + extruder_stacks
|
||||||
|
|
||||||
# Fetch the list of useable qualities across all extruders.
|
# Fetch the list of useable qualities across all extruders.
|
||||||
# The actual list of quality profiles come from the first extruder in the extruder list.
|
# The actual list of quality profiles come from the first extruder in the extruder list.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue