Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2075 for code/branches


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

fixed a small problem in OrxonoxOverlay

Location:
code/branches/objecthierarchy/src/orxonox/overlays
Files:
2 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
  • code/branches/objecthierarchy/src/orxonox/overlays/OrxonoxOverlay.h

    r2019 r2075  
    8888
    8989        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
     90
     91        virtual void changedName();
    9092
    9193        //! Shows the overlay with an detour to BaseObject::visibility_
Note: See TracChangeset for help on using the changeset viewer.