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

@ -530,6 +530,16 @@ class ExtruderManager(QObject):
if global_container_stack and global_container_stack.getBottom() and global_container_stack.getBottom().getId() != self._global_container_stack_definition_id:
self._global_container_stack_definition_id = global_container_stack.getBottom().getId()
self.globalContainerStackDefinitionChanged.emit()
# If the global container changed, the number of extruders could be changed and so the active_extruder_index is updated
extruder_count = global_container_stack.getProperty("machine_extruder_count", "value")
if extruder_count > 1:
if self._active_extruder_index == -1:
self.setActiveExtruderIndex(0)
else:
if self._active_extruder_index > -1:
self.setActiveExtruderIndex(-1)
self.activeExtruderChanged.emit()
self.resetSelectedObjectExtruders()