mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Add a don't show me again option to x-ray message
This commit is contained in:
parent
d2280b9afb
commit
ae6e78f5ed
1 changed files with 6 additions and 0 deletions
|
@ -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."),
|
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
|
lifetime = 60 * 5, # leave message for 5 minutes
|
||||||
title = catalog.i18nc("@info:title", "Model errors"),
|
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.getPreferences().addPreference(self._show_xray_warning_preference, True)
|
||||||
|
|
||||||
application.engineCreatedSignal.connect(self._onGlobalContainerChanged)
|
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:
|
def _onGlobalContainerChanged(self) -> None:
|
||||||
if self._global_stack:
|
if self._global_stack:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue