From 6e7c263557a2cab1bbad19a9f564ad85597c0828 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 8 Jul 2016 13:31:54 +0200 Subject: [PATCH] Improved logging --- cura/Settings/MachineManager.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index e0158f2ac4..89703ace6c 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -507,6 +507,8 @@ class MachineManager(QObject): preferred_quality_name = old_quality.getName() self.setActiveQuality(self._updateQualityContainer(self._global_container_stack.getBottom(), containers[0], preferred_quality_name).id) + else: + Logger.log("w", "While trying to set the active material, no material was found to replace.") @pyqtSlot(str) def setActiveVariant(self, variant_id): @@ -523,6 +525,8 @@ class MachineManager(QObject): if old_material: preferred_material_name = old_material.getName() self.setActiveMaterial(self._updateMaterialContainer(self._global_container_stack.getBottom(), containers[0], preferred_material_name).id) + else: + Logger.log("w", "While trying to set the active variant, no variant was found to replace.") @pyqtSlot(str) def setActiveQuality(self, quality_id): @@ -547,6 +551,8 @@ class MachineManager(QObject): Application.getInstance().messageBox(catalog.i18nc("@window:title", "Switched profiles"), catalog.i18nc("@label", "Do you want to transfer your changed settings to this profile?"), catalog.i18nc("@label", "If you transfer your settings they will override settings in the profile."), details, buttons = QMessageBox.Yes + QMessageBox.No, icon = QMessageBox.Question, callback = self._keepUserSettingsDialogCallback) + else: + Logger.log("w", "While trying to set the active quality, no quality was found to replace.") def _keepUserSettingsDialogCallback(self, button): if button == QMessageBox.Yes: