2.8 branch: Merge 11959 from trunk. Makes Object::setName() virtual, which fixes an issue with the uniform name ID mechanism.
This commit is contained in:
@@ -96,10 +96,14 @@ class OSG_EXPORT Object : public Referenced
|
||||
|
||||
|
||||
/** Set the name of object using C++ style string.*/
|
||||
inline void setName( const std::string& name ) { _name = name; }
|
||||
virtual void setName( const std::string& name ) { _name = name; }
|
||||
|
||||
/** Set the name of object using a C style string.*/
|
||||
inline void setName( const char* name ) { _name = name; }
|
||||
inline void setName( const char* name )
|
||||
{
|
||||
if (name) setName(std::string(name));
|
||||
else setName(std::string());
|
||||
}
|
||||
|
||||
/** Get the name of object.*/
|
||||
inline const std::string& getName() const { return _name; }
|
||||
|
||||
Reference in New Issue
Block a user