Example #1
0
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);
			}
		}
	}
}
Example #2
0
/*************************************************************************
 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);
}