Adapting the code in case a multiextruder printer will use only one extruder - CURA-4359

This commit is contained in:
Diego Prado Gesto 2017-09-26 17:49:53 +02:00
parent 28aadc1b05
commit 568535e3e2
4 changed files with 40 additions and 18 deletions

View file

@ -506,7 +506,7 @@ class ExtruderManager(QObject):
result.extend(self.getActiveExtruderStacks())
return result
## Returns the list of active extruder stacks.
## Returns the list of active extruder stacks, taking into account the machine extruder count.
#
# \return \type{List[ContainerStack]} a list of
def getActiveExtruderStacks(self) -> List["ExtruderStack"]:
@ -516,7 +516,8 @@ class ExtruderManager(QObject):
if global_stack and global_stack.getId() in self._extruder_trains:
for extruder in sorted(self._extruder_trains[global_stack.getId()]):
result.append(self._extruder_trains[global_stack.getId()][extruder])
return result
return result[:global_stack.getProperty("machine_extruder_count", "value")]
def __globalContainerStackChanged(self) -> None:
global_container_stack = Application.getInstance().getGlobalContainerStack()