mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Only disconnect old stack if we found a new one
CURA-2361
This commit is contained in:
parent
c6cae8a6eb
commit
eb1d5e13d0
1 changed files with 4 additions and 5 deletions
|
@ -49,15 +49,14 @@ class SettingInheritanceManager(QObject):
|
|||
self._update()
|
||||
|
||||
def _onActiveExtruderChanged(self):
|
||||
if self._active_container_stack:
|
||||
self._active_container_stack.propertyChanged.disconnect(self._onPropertyChanged)
|
||||
|
||||
new_active_stack = cura.Settings.ExtruderManager.getInstance().getActiveExtruderStack()
|
||||
if not new_active_stack:
|
||||
new_active_stack = self._global_container_stack
|
||||
|
||||
if new_active_stack != self._active_container_stack:
|
||||
# Check if changed
|
||||
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 = new_active_stack
|
||||
self._active_container_stack.propertyChanged.connect(self._onPropertyChanged)
|
||||
self._update() # Ensure that the settings_with_inheritance_warning list is populated.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue