From f121d2a6ef5ddce2ae582a9292516d5949a1e694 Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 29 Aug 2016 08:41:26 +0300 Subject: [PATCH] 1692: Correction for the next wrong case: edit Sketch_2, start Line, select 1st point, select 2nd point on line, move mouse, a new created line is coincident to Origin. --- src/PartSet/PartSet_SketcherReetntrantMgr.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/PartSet/PartSet_SketcherReetntrantMgr.cpp b/src/PartSet/PartSet_SketcherReetntrantMgr.cpp index 52972494f..291382149 100755 --- a/src/PartSet/PartSet_SketcherReetntrantMgr.cpp +++ b/src/PartSet/PartSet_SketcherReetntrantMgr.cpp @@ -145,11 +145,15 @@ bool PartSet_SketcherReetntrantMgr::processMouseMoved(ModuleBase_IViewWindow* th FeaturePtr aCurrentFeature = aFOperation->feature(); bool isLineFeature = false, isArcFeature = false; - if (aCurrentFeature->getKind() == SketchPlugin_Line::ID()) - isLineFeature = anActiveWidget->attributeID() == SketchPlugin_Line::START_ID(); - else if (isTangentArc(aFOperation, module()->sketchMgr()->activeSketch())) - isArcFeature = anActiveWidget->attributeID() == SketchPlugin_Arc::TANGENT_POINT_ID(); - + std::string anAttributeOnStart; + if (aCurrentFeature->getKind() == SketchPlugin_Line::ID()) { + anAttributeOnStart = SketchPlugin_Line::START_ID(); + isLineFeature = anActiveWidget->attributeID() == anAttributeOnStart; + } + else if (isTangentArc(aFOperation, module()->sketchMgr()->activeSketch())) { + anAttributeOnStart = SketchPlugin_Arc::TANGENT_POINT_ID(); + isArcFeature = anActiveWidget->attributeID() == anAttributeOnStart; + } bool aCanBeActivatedByMove = isLineFeature || isArcFeature; if (aCanBeActivatedByMove) { myPreviousFeature = aFOperation->feature(); @@ -159,7 +163,10 @@ bool PartSet_SketcherReetntrantMgr::processMouseMoved(ModuleBase_IViewWindow* th anActiveWidget = module()->activeWidget(); aCurrentFeature = anActiveWidget->feature(); aProcessed = true; - aPanel->activateNextWidget(anActiveWidget); + if (anActiveWidget->attributeID() == anAttributeOnStart) { + // it was not deactivated by preselection processing + aPanel->activateNextWidget(anActiveWidget); + } } else { // processing mouse move in active widget of restarted operation ModuleBase_ModelWidget* anActiveWidget = module()->activeWidget(); -- 2.39.2