void Selection::unSelect(const UnitContainer &units) { //add units to gui for(UnitIterator it = units.begin(); it != units.end(); ++it) { for(int i = 0; i < (int)selectedUnits.size(); ++i) { if(selectedUnits[i] == *it) { unSelect(i); } } } }
/************************************************************************* Notify that we want to select the given object *************************************************************************/ bool StelObjectMgr::setSelectedObject(const StelObjectP obj, StelModule::StelModuleSelectAction action) { if (!obj) { unSelect(); return false; } // An object has been found QList<StelObjectP> objs; objs.push_back(obj); return setSelectedObject(objs, action); }