//} else
myFeatures = theSelected;
// add highlighted elements if they are not selected
- std::list<ModuleBase_ViewerPrs>::const_iterator anIt = theHighlighted.cbegin();
- for ( ; anIt != theHighlighted.cend(); ++anIt) {
- if (!isContains(myFeatures, (*anIt)))
- myFeatures.push_back(*anIt);
+ foreach (ModuleBase_ViewerPrs aPrs, theHighlighted) {
+ if (!isContains(myFeatures, aPrs))
+ myFeatures.append(aPrs);
}
// Remove current feature if it is in the list (it will be moved as main feature)
- FeaturePtr aFea = feature();
- std::list<ModuleBase_ViewerPrs>::iterator anEraseIt = myFeatures.begin();
- for ( ; anEraseIt != myFeatures.end(); ++anEraseIt) {
- if (ModelAPI_Feature::feature((*anEraseIt).object()) == feature()) {
- myFeatures.erase(anEraseIt);
+ foreach (ModuleBase_ViewerPrs aPrs, myFeatures) {
+ FeaturePtr aF = ModelAPI_Feature::feature(aPrs.object());
+ if (ModelAPI_Feature::feature(aPrs.object()) == feature()) {
+ myFeatures.removeOne(aPrs);
break;
}
}