Salome HOME
refs #30 - Sketch base GUI: create, draw lines
[modules/shaper.git] / src / PartSet / PartSet_OperationSketch.cpp
index cc5fad46cb8f74a7493bd2580a35c23135ff36c1..9a3a5c716cfb7c69bb580ce999dc10a043ba8ca2 100644 (file)
@@ -32,7 +32,10 @@ PartSet_OperationSketch::~PartSet_OperationSketch()
 
 int PartSet_OperationSketch::getSelectionMode() const
 {
-  return TopAbs_FACE;
+  int aMode = TopAbs_FACE;
+  if (isEditMode())
+    aMode = TopAbs_VERTEX;
+  return aMode;
 }
 
 void PartSet_OperationSketch::setSelectedShapes(const NCollection_List<TopoDS_Shape>& theList)
@@ -40,6 +43,9 @@ void PartSet_OperationSketch::setSelectedShapes(const NCollection_List<TopoDS_Sh
   if (theList.IsEmpty())
     return;
 
+  if (isEditMode())
+    return;
+
   // get selected shape
   const TopoDS_Shape& aShape = theList.First();
   boost::shared_ptr<GeomAPI_Shape> aGShape(new GeomAPI_Shape);