mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
SettingInstanceManager now also watches containerchanged of extruder stacks
CURA-2674
This commit is contained in:
parent
df78bc47af
commit
7f1b060ef9
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue