From: nds Date: Tue, 3 Nov 2015 11:37:14 +0000 (+0300) Subject: myClickedPoint should not filled if the reentrant manager is active. Wrong case:... X-Git-Tag: V_2.0.0_alfa1~6^2~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=45fbdf373a9f557aed7a7487b0f703e5592bffa1;p=modules%2Fshaper.git myClickedPoint should not filled if the reentrant manager is active. Wrong case: create line, 1,2nd clicks, 'edition' mode, activate the 1st control. The value is modified to the current clicked. Edit operation - reentrant manager should not be active. --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index ff37f0462..fb0d9bb39 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -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; diff --git a/src/PartSet/PartSet_SketcherReetntrantMgr.cpp b/src/PartSet/PartSet_SketcherReetntrantMgr.cpp index fbb653b4c..6b6c356d1 100755 --- a/src/PartSet/PartSet_SketcherReetntrantMgr.cpp +++ b/src/PartSet/PartSet_SketcherReetntrantMgr.cpp @@ -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 + (myWorkshop->currentOperation()); + if (aFOperation->isEditOperation()) + anActive = myIsInternalEditOperation; + } + } + return anActive; } void PartSet_SketcherReetntrantMgr::startInternalEdit(const std::string& thePreviousAttributeID)