mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 06:19:05 +08:00
Ensure that first start machine actions model gets initialized
CURA-6932
This commit is contained in:
parent
9906d454ce
commit
26ba0e645a
@ -880,6 +880,8 @@ class CuraApplication(QtApplication):
|
||||
def getFirstStartMachineActionsModel(self, *args) -> "FirstStartMachineActionsModel":
|
||||
if self._first_start_machine_actions_model is None:
|
||||
self._first_start_machine_actions_model = FirstStartMachineActionsModel(self, parent = self)
|
||||
if self.started:
|
||||
self._first_start_machine_actions_model.initialize()
|
||||
return self._first_start_machine_actions_model
|
||||
|
||||
@pyqtSlot(result = QObject)
|
||||
|
@ -33,11 +33,11 @@ class FirstStartMachineActionsModel(ListModel):
|
||||
self._current_action_index = 0
|
||||
|
||||
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._update()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user