From 23b828655294aab836fab09b133c886fffb76342 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 21 Jan 2015 09:39:05 +0300 Subject: [PATCH] Issue #351 constraint is not applied on preselected segments The reason: lost selection of the circle center. The decision: do not perform redisplay the AIS presentation in the AIS_InteractiveContext(displayer) if the shapes are equal. Here the GeomAPI realisation is necessary. The TopoDS_Shape realisation of the isEqual method is not enough because different TShapes instances are created and isEqual returns false. A correction in the widget shape selector to avoid the distance presentation update by set an object(before set an attribute). In the previous version, the distance was jumped by selecting two points on lines. The reason is the distance calculation between point-object by setObject and after that point-point by setAttr --- src/PartSet/PartSet_WidgetShapeSelector.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/PartSet/PartSet_WidgetShapeSelector.cpp b/src/PartSet/PartSet_WidgetShapeSelector.cpp index c8b8112fe..86137696a 100644 --- a/src/PartSet/PartSet_WidgetShapeSelector.cpp +++ b/src/PartSet/PartSet_WidgetShapeSelector.cpp @@ -40,6 +40,10 @@ bool PartSet_WidgetShapeSelector::storeValue() const if (aRefAttr) { TopoDS_Shape aShape = myShape->impl(); AttributePtr aPntAttr = PartSet_Tools::findAttributeBy2dPoint(mySelectedObject, aShape, mySketch); + // this is an alternative, whether the attribute should be set or object in the attribute + // the first check is the attribute because the object already exist + // the object is set only if there is no selected attribute + // test case is - preselection for distance operation, which contains two points selected on lines if (aPntAttr) aRefAttr->setAttr(aPntAttr); else if (mySelectedObject) -- 2.39.2