]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #253 - Impossible to move dimensions in a Sketch
authornds <natalia.donis@opencascade.com>
Mon, 8 Dec 2014 11:51:58 +0000 (14:51 +0300)
committernds <natalia.donis@opencascade.com>
Mon, 8 Dec 2014 11:51:58 +0000 (14:51 +0300)
It avoids the edition operation start if the creation operation is active.

src/PartSet/PartSet_Module.cpp

index 2c055ffd6ccde652922c808d6135edd44103ead9..7baed12d8fbf632eb5e808513e5884c313f1fcb9 100644 (file)
@@ -302,6 +302,16 @@ void PartSet_Module::propertyPanelDefined(ModuleBase_Operation* theOperation)
 
 void PartSet_Module::onSelectionChanged()
 {
+  ModuleBase_Operation* aOperation = myWorkshop->currentOperation();
+  bool isSketcherOp = false;
+  // An edit operation is enable only if the current opeation is the sketch operation
+  if (aOperation && myCurrentSketch) {
+    if (PartSet_Tools::sketchPlane(myCurrentSketch))
+      isSketcherOp = (aOperation->id().toStdString() == SketchPlugin_Sketch::ID());
+  }
+  if (!isSketcherOp)
+    return;
+
   // Editing of constraints can be done on selection
   ModuleBase_ISelection* aSelect = myWorkshop->selection();
   QList<ModuleBase_ViewerPrs> aSelected = aSelect->getSelected();