Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 31, 2008, 3:52:14 AM (16 years ago)
Author:
landauf
Message:

fixed a small problem in OrxonoxOverlay

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/overlays/OrxonoxOverlay.cc

    r2046 r2075  
    6262        if (overlays_s.find(this->getName()) != overlays_s.end())
    6363        {
    64             COUT(1) << "Overlay names should be unique or you cannnot access them via console." << std::endl;
     64            COUT(1) << "Overlay names should be unique or you cannnot access them via console. Name: \"" << this->getName() << "\"" << std::endl;
    6565        }
    6666        overlays_s[this->getName()] = this;
     
    130130        XMLPortParam(OrxonoxOverlay, "correctAspect", setAspectCorrection,   getAspectCorrection,   xmlElement, mode);
    131131        XMLPortParam(OrxonoxOverlay, "background",    setBackgroundMaterial, getBackgroundMaterial, xmlElement, mode);
     132    }
     133
     134    void OrxonoxOverlay::changedName()
     135    {
     136        OrxonoxOverlay::overlays_s.erase(this->getOldName());
     137
     138        if (OrxonoxOverlay::overlays_s.find(this->getName()) != OrxonoxOverlay::overlays_s.end())
     139            COUT(1) << "Overlay names should be unique or you cannnot access them via console. Name: \"" << this->getName() << "\"" << std::endl;
     140
     141        OrxonoxOverlay::overlays_s[this->getName()] = this;
    132142    }
    133143
Note: See TracChangeset for help on using the changeset viewer.