From 0458d31dbbd01f3f93682ba42c4f07b6584cf322 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 16 Dec 2019 18:01:46 +0100 Subject: [PATCH] Mesh: [skip ci] handle visbility changes of mesh defects view provider due to side-effects caused in implementation of base class --- src/Mod/Mesh/Gui/ViewProviderDefects.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Mod/Mesh/Gui/ViewProviderDefects.cpp b/src/Mod/Mesh/Gui/ViewProviderDefects.cpp index ece4d59475..d0e9673a09 100644 --- a/src/Mod/Mesh/Gui/ViewProviderDefects.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderDefects.cpp @@ -90,6 +90,11 @@ void ViewProviderMeshDefects::onChanged(const App::Property* prop) if (prop == &LineWidth) { pcDrawStyle->lineWidth = LineWidth.getValue(); } + // Visibility changes must be handled here because in the base class it changes the attribute of the feature + // and thus affects the visibility of the mesh view provider which is undesired behaviour + else if (prop == &Visibility) { + Visibility.getValue() ? show() : hide(); + } else { ViewProviderDocumentObject::onChanged(prop); }