Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cura
diff options
context:
space:
mode:
authorLipu Fei <lipu.fei815@gmail.com>2017-10-30 12:33:49 +0300
committerLipu Fei <lipu.fei815@gmail.com>2017-10-30 17:43:40 +0300
commitaab601927c605b15c61beaf3c377ed19360f1d2b (patch)
treebd454a56fbab3acf6e19866f42e71f412254d5a7 /cura
parentb5904cd2396e698dcd318c33d63db759bb111c35 (diff)
Show Add Machine dialog after User Agreement dialog is closed
CURA-4501
Diffstat (limited to 'cura')
-rwxr-xr-xcura/CuraApplication.py19
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):