X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPartSet%2FPartSet_OperationSketch.cpp;h=acd79461dc773c4fb58ba4c62a7b4c97329fe1e3;hb=5bac8bac0b4cd2e4520c0908b2863d747e411fb9;hp=4ff87cae1414d760c31a3e2f7bcddacf5b8df636;hpb=8dc74f82810d5f597b78633b457efb0ef4f89f9f;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_OperationSketch.cpp b/src/PartSet/PartSet_OperationSketch.cpp index 4ff87cae1..acd79461d 100644 --- a/src/PartSet/PartSet_OperationSketch.cpp +++ b/src/PartSet/PartSet_OperationSketch.cpp @@ -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(theOperation); + return aPreviewOp != NULL; +} +