// the external feature should be removed with all references, sketch feature should be ignored
std::set<FeaturePtr> anIgnoredFeatures;
anIgnoredFeatures.insert(sketch());
+ // the current feature should be ignored, because it can use the external feature in the
+ // attributes and, therefore have a references to it. So, the delete functionality tries
+ // to delete this feature. Test case is creation of a constraint on external point,
+ // use in this control after an external point, the point of the sketch.
+ anIgnoredFeatures.insert(myFeature);
XGUI_Workshop::deleteFeatures(anObjects, anIgnoredFeatures);
}
myExternalObject = ObjectPtr();
<!-- SketchConstraintCoincedence -->
<feature id="SketchConstraintCoincidence" title="Coincident" tooltip="Create constraint for the coincidence of two points" icon=":icons/coincedence.png">
- <sketch_shape_selector id="ConstraintEntityA" label="First point" tooltip="Select a first point" shape_types="vertex"/>
+ <sketch_shape_selector id="ConstraintEntityA" label="First point" tooltip="Select a first point" shape_types="vertex">
+ <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
+ </sketch_shape_selector>
<sketch_shape_selector id="ConstraintEntityB" label="Second point" tooltip="Select a second point" shape_types="vertex">
<validator id="PartSet_DifferentObjects"/>
+ <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
</sketch_shape_selector>
<validator id="PartSet_CoincidentSelection"/>
</feature>
icon=":icons/equal.png">
<sketch_shape_selector id="ConstraintEntityA"
label="First object" tooltip="Select line, circle or arc" shape_types="edge">
+ <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityB"/>
</sketch_shape_selector>
<sketch_shape_selector id="ConstraintEntityB"
label="Second object" tooltip="Select line, circle or arc" shape_types="edge">
<validator id="SketchPlugin_EqualAttr" parameters="ConstraintEntityA"/>
<validator id="PartSet_DifferentObjects"/>
+ <validator id="SketchPlugin_ExternalValidator" parameters="ConstraintEntityA"/>
</sketch_shape_selector>
</feature>