}
} 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;
}
}
<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"