Return empty extruder list if no global stack

Just about every call of this function (except 2) would break when this returns None. The signature also says it doesn't return None. Let's return an empty list instead.

Contributes to issue CURA-5045.
This commit is contained in:
Ghostkeeper 2018-03-27 09:28:19 +02:00
parent 6d3fed8f52
commit bd4aba2572
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
2 changed files with 11 additions and 13 deletions

View file

@ -366,7 +366,7 @@ class ExtruderManager(QObject):
def getActiveExtruderStacks(self) -> List["ExtruderStack"]:
global_stack = Application.getInstance().getGlobalContainerStack()
if not global_stack:
return None
return []
result = []
if global_stack.getId() in self._extruder_trains: