Make crash dialog available before Application starts

CURA-4895
This commit is contained in:
Lipu Fei 2018-01-30 13:40:47 +01:00 committed by Diego Prado Gesto
parent 8e86c49c81
commit 1d946085d3
3 changed files with 48 additions and 13 deletions

View file

@ -1,5 +1,4 @@
# Copyright (c) 2017 Ultimaker B.V.
# Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from PyQt5.QtNetwork import QLocalServer
from PyQt5.QtNetwork import QLocalSocket
@ -113,6 +112,8 @@ class CuraApplication(QtApplication):
# changes of the settings.
SettingVersion = 4
Created = False
class ResourceTypes:
QmlFiles = Resources.UserType + 1
Firmware = Resources.UserType + 2
@ -256,7 +257,7 @@ class CuraApplication(QtApplication):
self._center_after_select = False
self._camera_animation = None
self._cura_actions = None
self._started = False
self.started = False
self._message_box_callback = None
self._message_box_callback_arguments = []
@ -409,6 +410,8 @@ class CuraApplication(QtApplication):
self.getCuraSceneController().setActiveBuildPlate(0) # Initialize
CuraApplication.Created = True
def _onEngineCreated(self):
self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider())
@ -503,7 +506,7 @@ class CuraApplication(QtApplication):
#
# Note that the AutoSave plugin also calls this method.
def saveSettings(self):
if not self._started: # Do not do saving during application start
if not self.started: # Do not do saving during application start
return
ContainerRegistry.getInstance().saveDirtyContainers()
@ -732,7 +735,7 @@ class CuraApplication(QtApplication):
for file_name in self._open_file_queue: #Open all the files that were queued up while plug-ins were loading.
self._openFile(file_name)
self._started = True
self.started = True
self.exec_()