Show Add Machine dialog after User Agreement dialog is closed

CURA-4501
This commit is contained in:
Lipu Fei 2017-10-30 10:33:49 +01:00
parent 85f7b1ac03
commit c0f1af94ab
3 changed files with 26 additions and 2 deletions

View file

@ -305,6 +305,9 @@ class CuraApplication(QtApplication):
preferences.addPreference("view/invert_zoom", False)
self._need_to_show_user_agreement = not Preferences.getInstance().getValue("general/accepted_user_agreement")
self._has_user_agreement_shown = False
for key in [
"dialog_load_path", # dialog_save_path is in LocalFileOutputDevicePlugin
"dialog_profile_path",
@ -377,6 +380,22 @@ class CuraApplication(QtApplication):
def _onEngineCreated(self):
self._engine.addImageProvider("camera", CameraImageProvider.CameraImageProvider())
onHasUserAgreementShownChanged = pyqtSignal()
@pyqtProperty(bool)
def needToShowUserAgreement(self):
return self._need_to_show_user_agreement
@pyqtProperty(bool, notify = onHasUserAgreementShownChanged)
def hasUserAgreementShown(self):
return self._has_user_agreement_shown
def setHasShownUserAgreement(self, shown = True):
emit_signal = self._has_user_agreement_shown != shown
self._has_user_agreement_shown = shown
if emit_signal:
self.onHasUserAgreementShownChanged.emit()
## The "Quit" button click event handler.
@pyqtSlot()
def closeApplication(self):