mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-05 23:04:30 +08:00
Fix extruder stacks list handling in profile models
CURA-4404
This commit is contained in:
parent
0eeded7930
commit
d89f027458
@ -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…
x
Reference in New Issue
Block a user