#include <PartSet_OperationSketchBase.h>
#include <SketchPlugin_Feature.h>
+#include <Model_Object.h>
#include <V3d_View.hxx>
{
boost::shared_ptr<SketchPlugin_Feature> aFeature =
boost::dynamic_pointer_cast<SketchPlugin_Feature>(theFeature);
+ if (!aFeature) { // if it is reference to a object feature
+ boost::shared_ptr<Model_Object> anObj =
+ boost::dynamic_pointer_cast<Model_Object>(theFeature);
+ if (anObj)
+ aFeature = boost::dynamic_pointer_cast<SketchPlugin_Feature>(anObj->featureRef());
+ }
return aFeature->preview();
}