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
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2020-06-29 14:43:19 +0300
committerJaime van Kessel <nallath@gmail.com>2020-06-29 14:43:19 +0300
commitae6e78f5ed64d5f34628bdda529b18c52be76886 (patch)
tree3cca234473ce839c7f4e98fc0dc08d0441180b2e /plugins/SolidView
parentd2280b9afb410306d5bd7f95be7a731776cef690 (diff)
Add a don't show me again option to x-ray message
Diffstat (limited to 'plugins/SolidView')
-rw-r--r--plugins/SolidView/SolidView.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py
index e127e5246f..48bd704ccb 100644
--- a/plugins/SolidView/SolidView.py
+++ b/plugins/SolidView/SolidView.py
@@ -70,11 +70,17 @@ class SolidView(View):
catalog.i18nc("@info:status", "Your model is not manifold. The highlighted areas indicate either missing or extraneous surfaces."),
lifetime = 60 * 5, # leave message for 5 minutes
title = catalog.i18nc("@info:title", "Model errors"),
+ option_text = catalog.i18nc("@info:option_text", "Do not show this message again"),
+ option_state = False
)
+ self._xray_warning_message.optionToggled.connect(self._onDontAskMeAgain)
application.getPreferences().addPreference(self._show_xray_warning_preference, True)
application.engineCreatedSignal.connect(self._onGlobalContainerChanged)
+ def _onDontAskMeAgain(self, checked: bool) -> None:
+ Application.getInstance().getPreferences().setValue(self._show_xray_warning_preference, not checked)
+
def _onGlobalContainerChanged(self) -> None:
if self._global_stack:
try: