diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp index b73f592a41..b632d1b702 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.cpp +++ b/src/Mod/Part/Gui/ViewProviderExt.cpp @@ -1467,6 +1467,12 @@ void ViewProviderPartExt::setupCoinGeometry( void ViewProviderPartExt::updateVisual() { + TopoDS_Shape shape = getRenderedShape().getShape(); + + if (lastRenderedShape.IsPartner(shape)) { + return; + } + Gui::SoUpdateVBOAction action; action.apply(this->faceset); @@ -1483,10 +1489,8 @@ void ViewProviderPartExt::updateVisual() haction.apply(this->nodeset); try { - TopoDS_Shape cShape = getRenderedShape().getShape(); - setupCoinGeometry( - cShape, + shape, coords, faceset, norm, @@ -1497,6 +1501,8 @@ void ViewProviderPartExt::updateVisual() NormalsFromUV ); + lastRenderedShape = shape; + VisualTouched = false; } catch (const Standard_Failure& e) { diff --git a/src/Mod/Part/Gui/ViewProviderExt.h b/src/Mod/Part/Gui/ViewProviderExt.h index f1516afd9f..b5bc9d547b 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.h +++ b/src/Mod/Part/Gui/ViewProviderExt.h @@ -254,6 +254,9 @@ private: // This is needed to restore old DiffuseColor values since the restore // function is asynchronous App::PropertyColorList _diffuseColor; + + // shape that was last rendered so if it does not change we don't re-render it without need + TopoDS_Shape lastRenderedShape; }; } // namespace PartGui