Mesh: [skip ci] handle visbility changes of mesh defects view provider due to side-effects caused in implementation of base class

This commit is contained in:
wmayer
2019-12-16 18:01:46 +01:00
parent 8bed7e4bd1
commit 0458d31dbb

View File

@@ -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);
}