Salome HOME
Constraint icons added
[modules/shaper.git] / src / PartSet / PartSet_OperationSketch.cpp
index 4ff87cae1414d760c31a3e2f7bcddacf5b8df636..acd79461dc773c4fb58ba4c62a7b4c97329fe1e3 100644 (file)
@@ -113,9 +113,10 @@ void PartSet_OperationSketch::mouseReleased(QMouseEvent* theEvent, Handle_V3d_Vi
     /// It is empty and we have to use the process mouse release to start edition operation
     /// for these objects
     if (theSelected.size() == 1) {
-      ObjectPtr aFeature = theSelected.front().object();
-      if (aFeature)
-        restartOperation(PartSet_OperationFeatureEdit::Type(), aFeature);
+      ObjectPtr aObject = theSelected.front().object();
+      if (aObject) {
+        restartOperation(PartSet_OperationFeatureEdit::Type(), aObject);
+      }
     }
   }
 }
@@ -250,3 +251,11 @@ void PartSet_OperationSketch::setSketchPlane(const TopoDS_Shape& theShape)
   emit closeLocalContext();
   emit planeSelected(aDir->x(), aDir->y(), aDir->z());
 }
+
+
+bool PartSet_OperationSketch::isValid(ModuleBase_IOperation* theOperation) const
+{
+  PartSet_OperationSketchBase* aPreviewOp = dynamic_cast<PartSet_OperationSketchBase*>(theOperation);
+  return aPreviewOp != NULL;
+}
+