mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 05:09:06 +08:00
SettingInstanceManager now also watches containerchanged of extruder stacks
CURA-2674
This commit is contained in:
parent
df78bc47af
commit
7f1b060ef9
@ -56,9 +56,11 @@ class SettingInheritanceManager(QObject):
|
||||
if new_active_stack != self._active_container_stack: # Check if changed
|
||||
if self._active_container_stack: # Disconnect signal from old container (if any)
|
||||
self._active_container_stack.propertyChanged.disconnect(self._onPropertyChanged)
|
||||
self._active_container_stack.containersChanged.disconnect(self._onContainersChanged)
|
||||
|
||||
self._active_container_stack = new_active_stack
|
||||
self._active_container_stack.propertyChanged.connect(self._onPropertyChanged)
|
||||
self._active_container_stack.containersChanged.connect(self._onContainersChanged)
|
||||
self._update() # Ensure that the settings_with_inheritance_warning list is populated.
|
||||
|
||||
def _onPropertyChanged(self, key, property_name):
|
||||
@ -178,7 +180,9 @@ class SettingInheritanceManager(QObject):
|
||||
self._onActiveExtruderChanged()
|
||||
|
||||
def _onContainersChanged(self, container):
|
||||
self._onActiveExtruderChanged()
|
||||
# TODO: Multiple container changes in sequence now cause quite a few recalculations.
|
||||
# This isn't that big of an issue, but it could be in the future.
|
||||
self._update()
|
||||
|
||||
@staticmethod
|
||||
def createSettingInheritanceManager(engine=None, script_engine=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user