mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 00:37:50 -06:00
Emit activeStackChanged as documented when containers in the active stack change
This fixes updating the intent models when you switch nozzles. Among other things, probably. Contributes to issue CURA-6600.
This commit is contained in:
parent
603f18ebc9
commit
f4a2f3efa6
2 changed files with 5 additions and 1 deletions
|
@ -45,6 +45,7 @@ class QualityProfilesDropDownMenuModel(ListModel):
|
|||
|
||||
application.globalContainerStackChanged.connect(self._onChange)
|
||||
machine_manager.activeQualityGroupChanged.connect(self._onChange)
|
||||
machine_manager.activeStackChanged.connect(self._onChange)
|
||||
machine_manager.extruderChanged.connect(self._onChange)
|
||||
|
||||
self._layer_height_unit = "" # This is cached
|
||||
|
|
|
@ -46,7 +46,6 @@ catalog = i18nCatalog("cura")
|
|||
from cura.Settings.GlobalStack import GlobalStack
|
||||
if TYPE_CHECKING:
|
||||
from cura.CuraApplication import CuraApplication
|
||||
from cura.Settings.CuraContainerStack import CuraContainerStack
|
||||
from cura.Machines.MaterialNode import MaterialNode
|
||||
from cura.Machines.QualityChangesGroup import QualityChangesGroup
|
||||
from cura.Machines.QualityGroup import QualityGroup
|
||||
|
@ -265,7 +264,11 @@ class MachineManager(QObject):
|
|||
|
||||
def _onActiveExtruderStackChanged(self) -> None:
|
||||
self.blurSettings.emit() # Ensure no-one has focus.
|
||||
if self._active_container_stack is not None:
|
||||
self._active_container_stack.pyqtContainersChanged.disconnect(self.activeStackChanged) # Unplug from the old one.
|
||||
self._active_container_stack = ExtruderManager.getInstance().getActiveExtruderStack()
|
||||
if self._active_container_stack is not None:
|
||||
self._active_container_stack.pyqtContainersChanged.connect(self.activeStackChanged) # Plug into the new one.
|
||||
|
||||
def __emitChangedSignals(self) -> None:
|
||||
self.activeQualityChanged.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue