]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_OperationFeatureCreate.cpp
Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / PartSet / PartSet_OperationFeatureCreate.cpp
index c8cd5c6deeebef14c28ecfbf2e82608b47208f0a..6aabe1e67fc8985c3ad5655ef289d393bd2fe2ab 100644 (file)
@@ -84,15 +84,19 @@ std::list<int> PartSet_OperationFeatureCreate::getSelectionModes(FeaturePtr theF
   return aModes;
 }
 
-void PartSet_OperationFeatureCreate::init(FeaturePtr theFeature,
-                                       const std::list<XGUI_ViewerPrs>& /*theSelected*/,
-                                       const std::list<XGUI_ViewerPrs>& /*theHighlighted*/)
+void PartSet_OperationFeatureCreate::initSelection(const std::list<XGUI_ViewerPrs>& theSelected,
+                                                   const std::list<XGUI_ViewerPrs>& /*theHighlighted*/)
 {
-  if (!theFeature || theFeature->getKind() != SKETCH_LINE_KIND)
-    return;
+}
+
+void PartSet_OperationFeatureCreate::initFeature(FeaturePtr theFeature)
+{
+//  if (!theFeature || theFeature->getKind() != SKETCH_LINE_KIND)
+//    return;
   myInitFeature = theFeature;
 }
 
+
 FeaturePtr PartSet_OperationFeatureCreate::sketch() const
 {
   return mySketch;
@@ -192,10 +196,10 @@ void PartSet_OperationFeatureCreate::onWidgetActivated(ModuleBase_ModelWidget* t
 
   if (myInitFeature && myActiveWidget) {
     ModuleBase_WidgetPoint2D* aWgt = dynamic_cast<ModuleBase_WidgetPoint2D*>(myActiveWidget);
-    if (aWgt)
-      aWgt->initFromPrevious(myInitFeature);
-    myInitFeature = FeaturePtr();
-    emit activateNextWidget(myActiveWidget);
+    if (aWgt && aWgt->initFromPrevious(myInitFeature)) { 
+      myInitFeature = FeaturePtr();
+      emit activateNextWidget(myActiveWidget);
+    }
   }
 }