Fix cura crashing

`activeQualityDisplayNameMap` no longer returned a dict and could thus not be a pyqt property

Cura-9773
This commit is contained in:
c.lamboo 2022-11-28 13:14:47 +01:00
parent 8e8437eab0
commit be40920042
3 changed files with 6 additions and 7 deletions

View file

@ -1634,17 +1634,16 @@ class MachineManager(QObject):
# - "my_profile - Engineering - Fine" (based on an intent)
@pyqtProperty("QList<QString>", notify = activeQualityDisplayNameChanged)
def activeQualityDisplayNameStringParts(self) -> List[str]:
return self.activeQualityDisplayNameMap.getStringParts()
return self.activeQualityDisplayNameMap().getStringParts()
@pyqtProperty("QList<QString>", notify = activeQualityDisplayNameChanged)
def activeQualityDisplayNameMainStringParts(self) -> List[str]:
return self.activeQualityDisplayNameMap.getMainStringParts()
return self.activeQualityDisplayNameMap().getMainStringParts()
@pyqtProperty("QList<QString>", notify = activeQualityDisplayNameChanged)
def activeQualityDisplayNameTailStringParts(self) -> List[str]:
return self.activeQualityDisplayNameMap.getTailStringParts()
return self.activeQualityDisplayNameMap().getTailStringParts()
@pyqtProperty("QVariantMap", notify = activeQualityDisplayNameChanged)
def activeQualityDisplayNameMap(self) -> ActiveQuality:
global_stack = self._application.getGlobalContainerStack()
if global_stack is None: