]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1913 check-box Auxiliary is missed for edited point in sketch
authornds <nds@opencascade.com>
Mon, 5 Dec 2016 11:22:07 +0000 (14:22 +0300)
committernds <nds@opencascade.com>
Mon, 5 Dec 2016 11:22:07 +0000 (14:22 +0300)
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_WidgetPoint2d.cpp

index 8d004cdedcb75fc2980512ef5675f858a5b8b0a4..667766244b64b5fcb22cff1c07eaeddbba26362f 100755 (executable)
@@ -625,6 +625,13 @@ bool PartSet_Module::createWidgets(ModuleBase_Operation* theOperation,
       // click on the digit of dimension constrain comes here
       // with an empty shape, so we need the check
       if (aFeature == anOpFeature && aShape.get() && !aShape->isNull()) {
+        // if feature has only one result and shape of result is equal to selected shape
+        // this attribute is not processed. It is a case of Sketch Point.
+        if (aFeature->results().size() == 1) {
+          ResultPtr aResult = aFeature->results().front();
+          if (aResult.get() && aResult->shape()->isEqual(aShape))
+            return aProcessed;
+        }
         const TopoDS_Shape& aTDShape = aShape->impl<TopoDS_Shape>();
         AttributePtr anAttribute = PartSet_Tools::findAttributeBy2dPoint(anObject, aTDShape,
                                                                mySketchMgr->activeSketch());
index 64070b492cd280fdf1e28f25e68a054785d8bbcc..8c7d1031b4d2a7c05410e47a27883d1bc65b8aaa 100644 (file)
@@ -446,7 +446,8 @@ void PartSet_WidgetPoint2D::mouseReleased(ModuleBase_IViewWindow* theWindow, QMo
     aFirstValue = myPreSelected;
   }
   // if we have selection and use it
-  if (aFirstValue.get() && isValidSelectionCustom(aFirstValue)) {
+  if (aFirstValue.get() && isValidSelectionCustom(aFirstValue) &&
+      aFirstValue->shape().get()) { /// Trihedron Axis may be selected, but shape is empty
     GeomShapePtr aGeomShape = aFirstValue->shape();
     TopoDS_Shape aShape = aGeomShape->impl<TopoDS_Shape>();
     ObjectPtr aObject = aFirstValue->object();