Commit a66920fd authored by Matthias Möller's avatar Matthias Möller

- moved parts of setName back to BaseObjectData

refs #670

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14532 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0f9f0e2a
......@@ -734,7 +734,7 @@ void BaseObject::setFromFileName(const QString &_filename ) {
setName(filename);
}
void BaseObject::setName(const QString &_name ) {
void BaseObject::setName(QString _name ) {
name_ = _name;
// Tell plugins about the name change
......
......@@ -438,7 +438,7 @@ class DLLEXPORTONLY BaseObject : public QObject {
QString name( );
/// set the name of the object. ( If you overwrite it, call BaseObject::setName(_name ) it in your funtion first)
virtual void setName(const QString &_name );
virtual void setName(QString _name );
/// return the filename of the object
QString filename();
......
......@@ -66,7 +66,6 @@
BaseObjectData::BaseObjectData(const BaseObjectData& _object)
: BaseObject(_object),
path_("."),
manipPlaced_(false),
rootNode_(_object.rootNode_),
separatorNode_(0),
......@@ -81,7 +80,6 @@ BaseObjectData::BaseObjectData(const BaseObjectData& _object)
BaseObjectData::BaseObjectData() :
BaseObject(),
path_("."),
manipPlaced_(false),
rootNode_( dynamic_cast< ACG::SceneGraph::SeparatorNode* > (PluginFunctions::getRootNode()) ),
separatorNode_(0),
......@@ -101,7 +99,6 @@ BaseObjectData::~BaseObjectData() {
}
void BaseObjectData::cleanup() {
path_ = ".";
// Delete everything below the seperator node on top of the object. This will remove the complete subtree.
if ( separatorNode_ == 0 )
......@@ -343,3 +340,23 @@ bool BaseObjectData::hasAdditionalNode(QString _pluginName, QString _nodeName ,
//=============================================================================
void BaseObjectData::setName(QString _name ) {
BaseObject::setName(_name);
std::string nodename = std::string("SeparatorNode for object " + _name.toUtf8());
separatorNode_->name( nodename );
nodename = std::string("ManipulatorNode for object " + _name.toUtf8());
manipulatorNode_->name( nodename );
nodename = std::string("BoundingBoxNode for object " + _name.toUtf8());
boundingBoxNode_->name( nodename );
nodename = std::string(_name.toUtf8() + "'s Material" );
materialNode_->name( nodename );
nodename = std::string("StencilRefNode for object " + _name.toUtf8());
stencilRefNode_->name( nodename );
}
......@@ -133,7 +133,7 @@ class DLLEXPORT BaseObjectData : public BaseObject
/** @} */
virtual void setName(QString _name );
//===========================================================================
/** @name Object visualization
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment