X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Module.cpp;h=d2c0d9de888270eb9e21938692d81e911602edaa;hb=d22fc665c79c31c9eea0625e04c2e941adfdf7be;hp=501105c4f3f80bf395249116e47a3fcbe3db6253;hpb=8c99e5e8dd74d99dfbf534bd66b32b70ca134aa7;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index 501105c4f..d2c0d9de8 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include @@ -265,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(); @@ -402,8 +405,6 @@ ModuleBase_Operation* PartSet_Module::createOperation(const std::string& theCmdI } if (PartSet_OperationFeatureCreate::canProcessKind(theCmdId)) { anOperation = new PartSet_OperationFeatureCreate(theCmdId.c_str(), this, aSketch); - } else if (theCmdId == PartSet_OperationFeatureEditMulti::Type()) { - anOperation = new PartSet_OperationFeatureEditMulti(theCmdId.c_str(), this, aSketch); } else if (theCmdId == PartSet_OperationFeatureEdit::Type()) { anOperation = new PartSet_OperationFeatureEdit(theCmdId.c_str(), this, aSketch); } @@ -447,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())); } } @@ -593,11 +595,13 @@ void PartSet_Module::onSelectionChanged() QList 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(myWorkshop->currentOperation()); if (!anEditOp) return; - anEditOp->commit(); + anEditOp->commit();*/ } else { PartSet_OperationSketchBase* aSketchOp = dynamic_cast(myWorkshop->currentOperation());