From a8486f88d7213a014a4b42979e9834d2623b9b5e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 26 Oct 2016 15:43:26 +0200 Subject: [PATCH] Inheritance icon is correctly shown for single extrusion printers if setting has limit_to_extruder property CURA-2752 --- cura/Settings/SettingInheritanceManager.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cura/Settings/SettingInheritanceManager.py b/cura/Settings/SettingInheritanceManager.py index 68891c7f4f..9a2db55dc7 100644 --- a/cura/Settings/SettingInheritanceManager.py +++ b/cura/Settings/SettingInheritanceManager.py @@ -5,6 +5,7 @@ from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal import UM.Settings from UM.Application import Application import cura.Settings +from UM.Logger import Logger ## The settingInheritance manager is responsible for checking each setting in order to see if one of the "deeper" @@ -39,9 +40,13 @@ class SettingInheritanceManager(QObject): return result @pyqtSlot(str, str, result = "QStringList") - def getOverridesForExtruder(self, key, extruder): - extruder = cura.Settings.ExtruderManager.getInstance().getExtruderStack(extruder) + def getOverridesForExtruder(self, key, extruder_index): + multi_extrusion = self._global_container_stack.getProperty("machine_extruder_count", "value") > 1 + if not multi_extrusion: + return self._settings_with_inheritance_warning + extruder = cura.Settings.ExtruderManager.getInstance().getExtruderStack(extruder_index) if not extruder: + Logger.log("w", "Unable to find extruder for current machine with index %s", extruder_index) return [] definitions = self._global_container_stack.getBottom().findDefinitions(key=key)