diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 00e6304c0a..0879f88841 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1985,7 +1985,7 @@ class CuraApplication(QtApplication): file_name = QUrl(file).toLocalFile() workspace_reader = self.getWorkspaceFileHandler() if workspace_reader is None: - Logger.log("w", "Workspace reader not found") + Logger.warning(f"Workspace reader not found, cannot read file {file_name}.") return workspace_reader.getReaderForFile(file_name).setOpenAsUcp(True) diff --git a/plugins/3MFReader/SpecificSettingsModel.py b/plugins/3MFReader/SpecificSettingsModel.py index 1a4e02b1b2..ac8e7af3ef 100644 --- a/plugins/3MFReader/SpecificSettingsModel.py +++ b/plugins/3MFReader/SpecificSettingsModel.py @@ -41,6 +41,6 @@ class SpecificSettingsModel(ListModel): }) def _update(self): - Logger.log("d", "Updating {model_class_name}.".format(model_class_name = self.__class__.__name__)) + Logger.debug(f"Updating {self.__class__.__name__}") self.setItems([]) return diff --git a/plugins/3MFReader/WorkspaceDialog.py b/plugins/3MFReader/WorkspaceDialog.py index c04062f686..4b9f1eaa6f 100644 --- a/plugins/3MFReader/WorkspaceDialog.py +++ b/plugins/3MFReader/WorkspaceDialog.py @@ -184,11 +184,11 @@ class WorkspaceDialog(QObject): return self._current_machine_name @staticmethod - def getIndexOfCurrentMachine(list_of_dicts, key, value): + def getIndexOfCurrentMachine(list_of_dicts, key, value, defaultIndex): for i, d in enumerate(list_of_dicts): if d.get(key) == value: # found the dictionary - return i; - return 0 + return i + return defaultIndex @pyqtProperty(int, notify = machineNameChanged) def currentMachinePositionIndex(self): @@ -197,7 +197,7 @@ class WorkspaceDialog(QObject): @pyqtProperty(QObject, notify = updatableMachinesChanged) def updatableMachinesModel(self) -> MachineListModel: if self._current_machine_name != "": - self._current_machine_pos_index = self.getIndexOfCurrentMachine(self._updatable_machines_model.getItems(), "id", self._current_machine_name) + self._current_machine_pos_index = self.getIndexOfCurrentMachine(self._updatable_machines_model.getItems(), "id", self._current_machine_name, defaultIndex = 0) else: self._current_machine_pos_index = 0 return cast(MachineListModel, self._updatable_machines_model) diff --git a/plugins/3MFWriter/SettingSelection.qml b/plugins/3MFWriter/SettingSelection.qml index d33f2ef8f0..794a5aacf6 100644 --- a/plugins/3MFWriter/SettingSelection.qml +++ b/plugins/3MFWriter/SettingSelection.qml @@ -19,7 +19,7 @@ RowLayout Layout.preferredWidth: UM.Theme.getSize("setting").width checked: modelData.selected onClicked: modelData.selected = checked - tooltip: modelData.selectable ? "" :catalog.i18nc("@tooltip", "This setting may not perform well while exporting in UCP. Users are asked to add it at their own risk") + tooltip: modelData.selectable ? "" :catalog.i18nc("@tooltip", "This setting may not perform well while exporting to UCP. Users are asked to add it at their own risk.") } UM.Label @@ -31,7 +31,7 @@ RowLayout { UM.I18nCatalog { id: catalog; name: "cura" } text: catalog.i18nc("@tooltip", - "This setting may not perform well while exporting in UCP, Users are asked to add it at their own risk") + "This setting may not perform well while exporting to UCP, Users are asked to add it at their own risk.") visible: !modelData.selectable }