Salome HOME
Issue #251. Append Export/Import NewGeom commands in the SALOME desktop.
[modules/shaper.git] / src / PartSet / PartSet_Module.cpp
index ad9210e3fdb37a573d6c2ef9090970bbac241e2e..d2c0d9de888270eb9e21938692d81e911602edaa 100644 (file)
@@ -264,6 +264,10 @@ void PartSet_Module::onMouseDoubleClick(QMouseEvent* theEvent)
 void PartSet_Module::onPlaneSelected(double theX, double theY, double theZ)
 {
   myWorkshop->viewer()->setViewProjection(theX, theY, theZ);
+}
+
+void PartSet_Module::onSketchLaunched()
+{
   xWorkshop()->actionsMgr()->update();
   // Set working plane
   ModuleBase_Operation* anOperation = myWorkshop->currentOperation();
@@ -444,6 +448,7 @@ ModuleBase_Operation* PartSet_Module::createOperation(const std::string& theCmdI
       connect(aSketchOp, SIGNAL(planeSelected(double, double, double)), this,
               SLOT(onPlaneSelected(double, double, double)));
       connect(aSketchOp, SIGNAL(fitAllView()), this, SLOT(onFitAllView()));
+      connect(aSketchOp, SIGNAL(launchSketch()), this, SLOT(onSketchLaunched()));
     }
   }
 
@@ -590,11 +595,13 @@ void PartSet_Module::onSelectionChanged()
   QList<ModuleBase_ViewerPrs> aSelected = aSelect->getSelected();
   // We need to stop edit operation if selection is cleared
   if (aSelected.size() == 0) {
-    PartSet_OperationFeatureEdit* anEditOp = 
+    // do not perform commit of the current edit operation here, because
+    // this functionality is realized inside this operation
+    /*PartSet_OperationFeatureEdit* anEditOp = 
       dynamic_cast<PartSet_OperationFeatureEdit*>(myWorkshop->currentOperation());
     if (!anEditOp)
       return;
-    anEditOp->commit();
+    anEditOp->commit();*/
   } else {
     PartSet_OperationSketchBase* aSketchOp = 
       dynamic_cast<PartSet_OperationSketchBase*>(myWorkshop->currentOperation());