+ if (hasSketchPlane()) {
+ // if shift button is pressed and there are some already selected objects, the operation should
+ // not be started. We just want to combine some selected objects.
+ bool aHasShift = (theEvent->modifiers() & Qt::ShiftModifier);
+ QList<ModuleBase_ViewerPrs> aSelected = theSelection->getSelected();
+ QList<ModuleBase_ViewerPrs> aHighlighted = theSelection->getHighlighted();
+ // commented: the next code is commented because the nearestFeature check the highlighting
+ // and selection inside
+ //if (aHasShift && (aSelected.size() > 0)) {
+ // foreach(ModuleBase_ViewerPrs aPrs, aHighlighted)
+ // aSelected.append(aPrs);
+ //}
+ //if (aHasShift && aSelected.size() > 0)
+ // return;
+
+ // there should be a start of operation, which uses the pre-highlighted objects,
+ // the selected ones are collected here and are processed by a mouse move
+ //if (aHighlighted.size() == 1) {
+ //if (aSelected.size() > 0) {
+ // 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;
+ //else
+ //myFeatures = aSelected;
+ }