Salome HOME
Added history branch into data tree (issue #22)
[modules/shaper.git] / src / PartSet / PartSet_OperationSketchBase.cpp
index 519c97f76d5335d3def922e4158b77de59982c2f..d424849b1364f96560a8dadced238af6cc30b4a8 100644 (file)
@@ -14,7 +14,7 @@ using namespace std;
 
 PartSet_OperationSketchBase::PartSet_OperationSketchBase(const QString& theId,
                                                             QObject* theParent)
-: ModuleBase_PropPanelOperation(theId, theParent)
+: ModuleBase_Operation(theId, theParent)
 {
 }
 
@@ -22,9 +22,17 @@ PartSet_OperationSketchBase::~PartSet_OperationSketchBase()
 {
 }
 
-const TopoDS_Shape& PartSet_OperationSketchBase::preview() const
+boost::shared_ptr<GeomAPI_Shape> PartSet_OperationSketchBase::preview(
+                                      boost::shared_ptr<ModelAPI_Feature> theFeature) const
 {
   boost::shared_ptr<SketchPlugin_Feature> aFeature = 
-    boost::dynamic_pointer_cast<SketchPlugin_Feature>(feature());
-  return aFeature->preview()->impl<TopoDS_Shape>();
+                              boost::dynamic_pointer_cast<SketchPlugin_Feature>(theFeature);
+  return aFeature->preview();
+}
+
+boost::shared_ptr<ModelAPI_Feature> PartSet_OperationSketchBase::createFeature()
+{
+  boost::shared_ptr<ModelAPI_Feature> aFeature = ModuleBase_Operation::createFeature();
+  emit featureConstructed(aFeature, FM_Activation);
+  return aFeature;
 }