diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 18d1bde57e..036369aed7 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1426,3 +1426,11 @@ class CuraApplication(QtApplication): node = node.getParent() Selection.add(node) + + + triggerPreferenceWindow = pyqtSignal() + + # This event has a simple logic, display pereference window if user decided to disable "collect information" + @pyqtProperty(bool, notify = triggerPreferenceWindow) + def showMyTest(self): + return True \ No newline at end of file diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 9bd99cae2b..28bcc763c7 100755 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -48,13 +48,13 @@ class SliceInfo(Extension): self.send_slice_info_message.addAction("Dismiss", name = catalog.i18nc("@action:button", "Allow"), icon = None, description = catalog.i18nc("@action:tooltip", "Allow Cura to send anonymized usage statistics to help prioritize future improvements to Cura. Some of your preferences and settings are sent, the Cura version and a hash of the models you're slicing.")) self.send_slice_info_message.addAction("Disable", name = catalog.i18nc("@action:button", "Disable"), icon = None, - description = catalog.i18nc("@action:tooltip", "Don't allow Cura to send anonymized usage statistics. You can enable it again in the preferences.")) + description = catalog.i18nc("@action:tooltip", "Don't allow Cura to send anonymized usage statistics. You can enable it again in the preferences."), button_style = Message.ActionButtonStyle.LINK) self.send_slice_info_message.actionTriggered.connect(self.messageActionTriggered) self.send_slice_info_message.show() def messageActionTriggered(self, message_id, action_id): if action_id == "Disable": - Preferences.getInstance().setValue("info/send_slice_info", False) + CuraApplication.getInstance().triggerPreferenceWindow.emit() self.send_slice_info_message.hide() Preferences.getInstance().setValue("info/asked_send_slice_info", True) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 91098bbb29..40fc88c975 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -528,6 +528,12 @@ UM.MainWindow onTriggered: preferences.visible = true } + Connections + { + target: CuraApplication + onShowMyTestChanged: preferences.visible = true + } + MessageDialog { id: newProjectDialog