From: nds Date: Mon, 29 Aug 2016 05:41:26 +0000 (+0300) Subject: 1692: Correction for the next wrong case: edit Sketch_2, start Line, select 1st point... X-Git-Tag: V_2.5.0~125 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f121d2a6ef5ddce2ae582a9292516d5949a1e694;p=modules%2Fshaper.git 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. --- 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();