mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-29 15:25:02 +08:00
Fix cura crashing
`activeQualityDisplayNameMap` no longer returned a dict and could thus not be a pyqt property Cura-9773
This commit is contained in:
parent
8e8437eab0
commit
be40920042
@ -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:
|
||||
|
@ -226,7 +226,7 @@ class UFPWriter(MeshWriter):
|
||||
"changes": {},
|
||||
"all_settings": {},
|
||||
},
|
||||
"quality": asdict(machine_manager.activeQualityDisplayNameMap),
|
||||
"quality": asdict(machine_manager.activeQualityDisplayNameMap()),
|
||||
}
|
||||
|
||||
global_stack = cast(GlobalStack, Application.getInstance().getGlobalContainerStack())
|
||||
|
@ -56,7 +56,7 @@ UM.Dialog
|
||||
UM.Label
|
||||
{
|
||||
id: infoText
|
||||
text: catalog.i18nc("@text:window, %1 is a profile name", "You have customized some profile settings. Would you like to Keep these changed settings after switching profiles? Alternatively, you can discard the changes to load the defaults from '%1'.").arg(Cura.MachineManager.activeQualityDisplayNameMap["main"])
|
||||
text: catalog.i18nc("@text:window, %1 is a profile name", "You have customized some profile settings. Would you like to Keep these changed settings after switching profiles? Alternatively, you can discard the changes to load the defaults from '%1'.").arg(Cura.MachineManager.activeQualityDisplayNameMainStringParts.join(" - "))
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
wrapMode: Text.WordWrap
|
||||
@ -83,7 +83,7 @@ UM.Dialog
|
||||
|
||||
columnHeaders: [
|
||||
catalog.i18nc("@title:column", "Profile settings"),
|
||||
Cura.MachineManager.activeQualityDisplayNameMap["main"],
|
||||
Cura.MachineManager.activeQualityDisplayNameMainStringParts.join(" - "),
|
||||
catalog.i18nc("@title:column", "Current changes")
|
||||
]
|
||||
model: UM.TableModel
|
||||
|
Loading…
x
Reference in New Issue
Block a user