From: mpv Date: Mon, 19 May 2014 11:37:28 +0000 (+0400) Subject: Fix for visualization of "Redo" in sketch crash X-Git-Tag: V_0.2~45^2~1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6c5a4baa89f4847ca56f5dd0666158f145fc3d66;p=modules%2Fshaper.git Fix for visualization of "Redo" in sketch crash --- diff --git a/src/PartSet/PartSet_OperationSketchBase.cpp b/src/PartSet/PartSet_OperationSketchBase.cpp index 9eac6c82a..0dd6efc90 100644 --- a/src/PartSet/PartSet_OperationSketchBase.cpp +++ b/src/PartSet/PartSet_OperationSketchBase.cpp @@ -5,6 +5,7 @@ #include #include +#include #include @@ -29,6 +30,12 @@ boost::shared_ptr PartSet_OperationSketchBase::preview( { boost::shared_ptr aFeature = boost::dynamic_pointer_cast(theFeature); + if (!aFeature) { // if it is reference to a object feature + boost::shared_ptr anObj = + boost::dynamic_pointer_cast(theFeature); + if (anObj) + aFeature = boost::dynamic_pointer_cast(anObj->featureRef()); + } return aFeature->preview(); }