]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
myClickedPoint should not filled if the reentrant manager is active. Wrong case:...
authornds <nds@opencascade.com>
Tue, 3 Nov 2015 11:37:14 +0000 (14:37 +0300)
committernds <nds@opencascade.com>
Tue, 3 Nov 2015 11:37:14 +0000 (14:37 +0300)
Edit operation - reentrant manager should not be active.

src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_SketcherReetntrantMgr.cpp

index ff37f046271aef492cc0f8be9901ee4c67390c9a..fb0d9bb39c85a34bd4fe89e0668a2c0ddffb8967 100755 (executable)
@@ -299,14 +299,14 @@ void PartSet_SketcherMgr::onAfterValuesChangedInPropertyPanel()
 
 void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
 {
+  if (myModule->sketchReentranceMgr()->processMousePressed(theWnd, theEvent))
+    return;
+
   get2dPoint(theWnd, theEvent, myClickedPoint);
 
   if (!(theEvent->buttons() & Qt::LeftButton))
     return;
 
-  if (myModule->sketchReentranceMgr()->processMousePressed(theWnd, theEvent))
-    return;
-
   // Clear dragging mode
   myIsDragging = false;
 
index fbb653b4c2d48e0cb17e7c7138f017ebd1027e42..6b6c356d105cfac7227219ab5b0b76ae27cbb05e 100755 (executable)
@@ -261,10 +261,19 @@ bool PartSet_SketcherReetntrantMgr::canBeCommittedByPreselection()
 
 bool PartSet_SketcherReetntrantMgr::isActiveMgr() const
 {
-  PartSet_SketcherMgr* aSketcherMgr = module()->sketchMgr();
   ModuleBase_Operation* aCurrentOperation = myWorkshop->currentOperation();
-  return PartSet_SketcherMgr::isSketchOperation(aCurrentOperation) ||
-         PartSet_SketcherMgr::isNestedSketchOperation(aCurrentOperation);
+
+  bool anActive = PartSet_SketcherMgr::isSketchOperation(aCurrentOperation);
+  if (!anActive) {
+    anActive = PartSet_SketcherMgr::isNestedSketchOperation(aCurrentOperation);
+    if (anActive) { // the manager is not active when the current operation is a usual Edit
+      ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
+                                                       (myWorkshop->currentOperation());
+      if (aFOperation->isEditOperation())
+        anActive = myIsInternalEditOperation;
+    }
+  }
+  return anActive;
 }
 
 void PartSet_SketcherReetntrantMgr::startInternalEdit(const std::string& thePreviousAttributeID)