- ObjectPtr aFeature = aSelected.first().object();
- if (aFeature) {
- std::string anOperationType =
- (aSelected.size() > 1) ?
- PartSet_OperationFeatureEditMulti::Type() : PartSet_OperationFeatureEdit::Type();
- restartOperation(anOperationType, aFeature);
- }
- }
- else
- myFeatures = aHighlighted;
+ // ObjectPtr aFeature = aSelected.first().object();
+ // if (aFeature) {
+ // commented: end
+ Handle(V3d_View) aView = theViewer->activeView();
+ ObjectPtr aFeature = PartSet_Tools::nearestFeature(theEvent->pos(), aView, feature(),
+ aSelected, aHighlighted);
+ if (aFeature)
+ restartOperation(PartSet_OperationFeatureEdit::Type(), aFeature);
+ //}
+ //}
+ //else
+ // myFeatures = aHighlighted;