diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2017-10-30 12:33:49 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2017-10-30 17:43:40 +0300 |
commit | aab601927c605b15c61beaf3c377ed19360f1d2b (patch) | |
tree | bd454a56fbab3acf6e19866f42e71f412254d5a7 /cura | |
parent | b5904cd2396e698dcd318c33d63db759bb111c35 (diff) |
Show Add Machine dialog after User Agreement dialog is closed
CURA-4501
Diffstat (limited to 'cura')
-rwxr-xr-x | cura/CuraApplication.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 4a54f5b0ba..96d8ced7a6 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -300,6 +300,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", @@ -372,6 +375,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): |