//-------------------------------------------------------------------------------- void CMultiSelEditor::remove(const Ogre::StringVector& newselection) { if(mDeletionInProgress) return; Ogre::StringVector::const_iterator it = newselection.begin(); NameObjectPairList::iterator dit; while(it != newselection.end()) { CBaseEditor *object = mOgitorsRoot->FindObject(*it); if(object) { if((dit = mSelectedObjects.find(object->getName())) != mSelectedObjects.end()) { mSelectedObjects.erase(dit); object->setSelected(false); } } it++; } _createModifyList(); }
//-------------------------------------------------------------------------------- void CMultiSelEditor::add(const Ogre::StringVector& newselection) { if(mDeletionInProgress) return; Ogre::StringVector::const_iterator it = newselection.begin(); while(it != newselection.end()) { CBaseEditor *object = mOgitorsRoot->FindObject(*it); if(object && object != this) { if(mSelectedObjects.find(object->getName()) == mSelectedObjects.end()) { mSelectedObjects.insert(NameObjectPairList::value_type(object->getName(), object)); object->setSelected(true); } } it++; } _createModifyList(); }