Update the active extruder index when the global container changes. This

fixes a problem when Cura starts with a single extruder printer but the
user then choose a multiextruder printer - CURA-4386
Also added a quality definition in UM3E extruder with the ids of the UM3
extruders, so that the profiles for UM3 are also valid for UM3E and viceversa - CURA-4389
All are related issues with profiles and multiextruder printers
This commit is contained in:
Diego Prado Gesto 2017-09-28 18:02:39 +02:00
parent 61e65d5cb0
commit afb83fac88
8 changed files with 37 additions and 36 deletions

View file

@ -98,16 +98,10 @@ class ProfilesModel(InstanceContainersModel):
extruder_manager = ExtruderManager.getInstance()
active_extruder = extruder_manager.getActiveExtruderStack()
extruder_stacks = extruder_manager.getActiveExtruderStacks()
if extruder_stacks:
if multiple_extrusion:
# Place the active extruder at the front of the list.
if active_extruder in extruder_stacks:
extruder_stacks.remove(active_extruder)
extruder_stacks = [active_extruder] + extruder_stacks
else:
# The active extruder is the first in the list and only the active extruder is use to compute the usable qualities
active_extruder = None
extruder_stacks = []
if multiple_extrusion:
# Place the active extruder at the front of the list.
extruder_stacks.remove(active_extruder)
extruder_stacks = [active_extruder] + extruder_stacks
# Get a list of usable/available qualities for this machine and material
qualities = QualityManager.getInstance().findAllUsableQualitiesForMachineAndExtruders(global_container_stack,