Esempio n. 1
0
//--------------------------------------------------------------------------------
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();
}
Esempio n. 2
0
//--------------------------------------------------------------------------------
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();
}