Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / PartSet / PartSet_OperationSketch.cpp
index 7bfddff3066104fa436db128714d63338039b724..331f7e63e24b2ea1b26a17e99d3870b7bf353cfc 100644 (file)
@@ -76,7 +76,6 @@ void PartSet_OperationSketch::mousePressed(QMouseEvent* theEvent, ModuleBase_IVi
         std::string anOperationType =
             (aSelected.size() > 1) ?
                 PartSet_OperationFeatureEditMulti::Type() : PartSet_OperationFeatureEdit::Type();
-        //theViewer->enableSelection(false);
         restartOperation(anOperationType, aFeature);
       }
     } //else
@@ -88,12 +87,13 @@ void PartSet_OperationSketch::mousePressed(QMouseEvent* theEvent, ModuleBase_IVi
 
 void PartSet_OperationSketch::selectionChanged(ModuleBase_ISelection* theSelection)
 {
-  if (hasSketchPlane())
+  if (hasSketchPlane()) 
     return;
 
   QList<ModuleBase_ViewerPrs> aSelected = theSelection->getSelected();
   if (!aSelected.empty()) {
     ModuleBase_ViewerPrs aPrs = aSelected.first();
+    // We have to select a plane before any operation
     const TopoDS_Shape& aShape = aPrs.shape();
     if (!aShape.IsNull())
       setSketchPlane(aShape);