mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 00:37:50 -06:00
Fix machine settings page
CURA-6495
This commit is contained in:
parent
b9d8b89113
commit
5fee82bcb7
1 changed files with 8 additions and 0 deletions
|
@ -35,6 +35,8 @@ class FirstStartMachineActionsModel(ListModel):
|
||||||
self._application = application
|
self._application = application
|
||||||
self._application.initializationFinished.connect(self._initialize)
|
self._application.initializationFinished.connect(self._initialize)
|
||||||
|
|
||||||
|
self._previous_global_stack = None
|
||||||
|
|
||||||
def _initialize(self) -> None:
|
def _initialize(self) -> None:
|
||||||
self._application.getMachineManager().globalContainerChanged.connect(self._update)
|
self._application.getMachineManager().globalContainerChanged.connect(self._update)
|
||||||
self._update()
|
self._update()
|
||||||
|
@ -86,6 +88,12 @@ class FirstStartMachineActionsModel(ListModel):
|
||||||
self.setItems([])
|
self.setItems([])
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Do not update if the machine has not been switched. This can cause the SettingProviders on the Machine
|
||||||
|
# Setting page to do a force update, but they can use potential outdated cached values.
|
||||||
|
if self._previous_global_stack is not None and global_stack.getId() == self._previous_global_stack.getId():
|
||||||
|
return
|
||||||
|
self._previous_global_stack = global_stack
|
||||||
|
|
||||||
definition_id = global_stack.definition.getId()
|
definition_id = global_stack.definition.getId()
|
||||||
first_start_actions = self._application.getMachineActionManager().getFirstStartActions(definition_id)
|
first_start_actions = self._application.getMachineActionManager().getFirstStartActions(definition_id)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue