]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Correction to create an axis on points.
authornds <natalia.donis@opencascade.com>
Mon, 13 Apr 2015 10:56:09 +0000 (13:56 +0300)
committernds <natalia.donis@opencascade.com>
Mon, 13 Apr 2015 10:56:09 +0000 (13:56 +0300)
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/SketchPlugin/plugin-Sketch.xml

index de8e013d4a19080fb16ec6cd12f285550f978020..a88479bc5e845eeb14b88d52b7efc8d7ed8e939f 100644 (file)
@@ -158,9 +158,9 @@ bool ModuleBase_WidgetShapeSelector::setObject(ObjectPtr theSelectedObject,
       }
     } else {
       AttributeSelectionPtr aSelectAttr = aData->selection(attributeID());
-      ResultPtr aBody = std::dynamic_pointer_cast<ModelAPI_Result>(theSelectedObject);
-      if (aSelectAttr && aBody && (theShape.get() != NULL)) {
-        aSelectAttr->setValue(aBody, theShape);
+      ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theSelectedObject);
+      if (aSelectAttr) {
+        aSelectAttr->setValue(aResult, theShape);
         isChanged = true;
       }
     }
index b42b4af66a0a9fa6d94983293f98cf3ec24c2c58..9b4b848ec60447850b663f37195c96f05e9880b1 100644 (file)
       <feature id="SketchConstraintParallel" title="Parallel" tooltip="Create constraint defining two parallel lines" icon=":icons/parallel.png">
         <sketch_shape_selector id="ConstraintEntityA" 
             label="First line" tooltip="Select a line" shape_types="edge">
-            <validator id="GeomValidators_Edge" parameters="line"/>
-            <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
+          <validator id="GeomValidators_Edge" parameters="line"/>
+          <validator id="PartSet_DifferentObjects"/>
+          <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
         </sketch_shape_selector>
         
         <sketch_shape_selector id="ConstraintEntityB" label="Second line" tooltip="Select a line"