Commit 7971da8a authored by Jan Möbius's avatar Jan Möbius

Integrated ObjectManager to communicate with core

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7786 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a731b7cd
...@@ -277,6 +277,27 @@ void Core::backupRequest( int _id , QString _name ) { ...@@ -277,6 +277,27 @@ void Core::backupRequest( int _id , QString _name ) {
/// This slot is called by the object manager when a new object is created /// This slot is called by the object manager when a new object is created
void Core::newObject(int _objectId) { void Core::newObject(int _objectId) {
// std::cerr << "newObject" << std::endl;
BaseObjectData* baseObjectData = 0;
PluginFunctions::getObject(_objectId,baseObjectData);
// Try to get the BaseObjectData because only then we have visibility info
if ( baseObjectData ) {
// std::cerr << "Connecting BaseObjectData" << std::endl;
// connect( baseObjectData, SIGNAL(visibilityChanged(int)),this,SLOT(test(int)) );
//
}
BaseObject* baseObject = 0;
PluginFunctions::getObject(_objectId,baseObject);
if ( baseObject ) {
// std::cerr << "Base Object specific connects" << std::endl;
// connect( baseObject, SIGNAL(objectSelectionChanged(int)),this,SLOT(slotObjectSelectionChanged(int)) );
}
// std::cerr << "Core Objectmanager" << std::endl;
} }
......
...@@ -94,6 +94,7 @@ BaseObject::BaseObject(const BaseObject& _object) : ...@@ -94,6 +94,7 @@ BaseObject::BaseObject(const BaseObject& _object) :
PluginFunctions::objectRoot()->appendChild(this); PluginFunctions::objectRoot()->appendChild(this);
} }
objectManager_.objectCreated(id());
} }
BaseObject::BaseObject(BaseObject* _parent) : BaseObject::BaseObject(BaseObject* _parent) :
...@@ -115,6 +116,7 @@ BaseObject::BaseObject(BaseObject* _parent) : ...@@ -115,6 +116,7 @@ BaseObject::BaseObject(BaseObject* _parent) :
PluginFunctions::objectRoot()->appendChild(this); PluginFunctions::objectRoot()->appendChild(this);
} }
objectManager_.objectCreated(id());
} }
BaseObject::~BaseObject() { BaseObject::~BaseObject() {
......
...@@ -73,6 +73,8 @@ BaseObjectData::BaseObjectData(const BaseObjectData& _object) ...@@ -73,6 +73,8 @@ BaseObjectData::BaseObjectData(const BaseObjectData& _object)
{ {
// We have to create our own visualization nodes as we are a new object // We have to create our own visualization nodes as we are a new object
init(); init();
getObjectManager()->objectCreated(id());
} }
BaseObjectData::BaseObjectData( SeparatorNode* _rootNode ) : BaseObjectData::BaseObjectData( SeparatorNode* _rootNode ) :
...@@ -87,6 +89,8 @@ BaseObjectData::BaseObjectData( SeparatorNode* _rootNode ) : ...@@ -87,6 +89,8 @@ BaseObjectData::BaseObjectData( SeparatorNode* _rootNode ) :
stencilRefNode_(0) stencilRefNode_(0)
{ {
init(); init();
getObjectManager()->objectCreated(id());
} }
BaseObjectData::~BaseObjectData() { BaseObjectData::~BaseObjectData() {
......
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