Fix not displaying configuration with both extruders empty

This commit is contained in:
ChrisTerBeke 2019-08-23 16:23:51 +02:00
parent c491d7f3e2
commit 36f6dba2fc
2 changed files with 9 additions and 1 deletions

View file

@ -58,6 +58,14 @@ class PrinterConfigurationModel(QObject):
return False
return self._printer_type != ""
def hasAnyMaterialLoaded(self) -> bool:
if not self.isValid():
return False
for configuration in self._extruder_configurations:
if configuration.activeMaterial and configuration.activeMaterial.type != "empty":
return True
return False
def __str__(self):
message_chunks = []
message_chunks.append("Printer type: " + self._printer_type)