diff --git a/plugins/3MFReader/WorkspaceDialog.py b/plugins/3MFReader/WorkspaceDialog.py index 13851c041d..c3e4187652 100644 --- a/plugins/3MFReader/WorkspaceDialog.py +++ b/plugins/3MFReader/WorkspaceDialog.py @@ -362,6 +362,13 @@ class WorkspaceDialog(QObject): def exportedSettingModel(self): return self._exported_settings_model + @pyqtProperty("QVariantList", notify=exportedSettingModelChanged) + def exportedSettingModelItems(self): + return self._exported_settings_model.items + + @pyqtProperty(int, notify=exportedSettingModelChanged) + def exportedSettingModelRowCount(self): + return self._exported_settings_model.rowCount() @pyqtSlot() def closeBackend(self) -> None: """Close the backend: otherwise one could end up with "Slicing...""" diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index 95dce875c1..950c72a3d6 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -173,7 +173,7 @@ UM.Dialog { id: numberOfOverrides leftLabelText: catalog.i18nc("@action:label", "Settings Loaded from UCP file") - rightLabelText: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.exportedSettingModel.rowCount()).arg(manager.exportedSettingModel.rowCount()) + rightLabelText: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.exportedSettingModelRowCount).arg(manager.exportedSettingModelRowCount) buttonText: tableViewSpecificSettings.shouldBeVisible ? catalog.i18nc("@action:button", "Hide settings") : catalog.i18nc("@action:button", "Show settings") onButtonClicked: tableViewSpecificSettings.shouldBeVisible = !tableViewSpecificSettings.shouldBeVisible } @@ -196,16 +196,9 @@ UM.Dialog { id: tableModel headers: ["category", "label", "value"] - rows: manager.exportedSettingModel.items + rows: manager.exportedSettingModelItems } } - - property var modelRows: manager.exportedSettingModel.items - onModelRowsChanged: - { - tableModel.clear() - tableModel.rows = modelRows - } } comboboxVisible: manager.qualityChangesConflict