From 98275d2da056a6e3a0feabcf663d101bc1340bd5 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 25 Oct 2019 13:44:55 +0200 Subject: [PATCH] Create first start model on demand So if we don't use it, we don't spend any time on it. --- cura/CuraApplication.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index e5fe813bbd..4ce8eadaf8 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -224,7 +224,7 @@ class CuraApplication(QtApplication): self._quality_management_model = None self._discovered_printer_model = DiscoveredPrintersModel(self, parent = self) - self._first_start_machine_actions_model = FirstStartMachineActionsModel(self, parent = self) + self._first_start_machine_actions_model = None self._welcome_pages_model = WelcomePagesModel(self, parent = self) self._add_printer_pages_model = AddPrinterPagesModel(self, parent = self) self._whats_new_pages_model = WhatsNewPagesModel(self, parent = self) @@ -878,6 +878,8 @@ class CuraApplication(QtApplication): @pyqtSlot(result = QObject) def getFirstStartMachineActionsModel(self, *args) -> "FirstStartMachineActionsModel": + if self._first_start_machine_actions_model is None: + self._first_start_machine_actions_model = FirstStartMachineActionsModel(self, parent = self) return self._first_start_machine_actions_model @pyqtSlot(result = QObject)