mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Inheritance icon is correctly shown for single extrusion printers if setting has limit_to_extruder property
CURA-2752
This commit is contained in:
parent
53a4e5e6c0
commit
a8486f88d7
1 changed files with 7 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue