From 6c5a4baa89f4847ca56f5dd0666158f145fc3d66 Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 19 May 2014 15:37:28 +0400 Subject: [PATCH] Fix for visualization of "Redo" in sketch crash --- src/PartSet/PartSet_OperationSketchBase.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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(); } -- 2.39.2