diff options
author | Jaime van Kessel <nallath@gmail.com> | 2020-06-29 14:43:19 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2020-06-29 14:43:19 +0300 |
commit | ae6e78f5ed64d5f34628bdda529b18c52be76886 (patch) | |
tree | 3cca234473ce839c7f4e98fc0dc08d0441180b2e /plugins/SolidView | |
parent | d2280b9afb410306d5bd7f95be7a731776cef690 (diff) |
Add a don't show me again option to x-ray message
Diffstat (limited to 'plugins/SolidView')
-rw-r--r-- | plugins/SolidView/SolidView.py | 6 |
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: |