diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp index 34bb85db0190..79c14508b26b 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.cpp +++ b/src/Mod/Part/Gui/ViewProviderExt.cpp @@ -325,11 +325,19 @@ ViewProviderPartExt::~ViewProviderPartExt() void ViewProviderPartExt::onChanged(const App::Property* prop) { + Part::Feature* feature = dynamic_cast(pcObject); + if (prop == &Deviation) { - VisualTouched = true; + if(Visibility.getValue() && feature && !feature->Shape.getValue().IsNull()) + updateVisual(feature->Shape.getValue()); + else + VisualTouched = true; } if (prop == &AngularDeflection) { - VisualTouched = true; + if(Visibility.getValue() && feature && !feature->Shape.getValue().IsNull()) + updateVisual(feature->Shape.getValue()); + else + VisualTouched = true; } if (prop == &LineWidth) { pcLineStyle->lineWidth = LineWidth.getValue(); @@ -479,7 +487,7 @@ void ViewProviderPartExt::onChanged(const App::Property* prop) else { // if the object was invisible and has been changed, recreate the visual if (prop == &Visibility && Visibility.getValue() && VisualTouched) { - updateVisual(dynamic_cast(pcObject)->Shape.getValue()); + updateVisual(feature->Shape.getValue()); // The material has to be checked again (#0001736) onChanged(&DiffuseColor); }