Commit 8d43c458 authored by Jan Möbius's avatar Jan Möbius

Handle object tree ntegration for BaseObjects automatically

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7774 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b41f5a1b
......@@ -122,6 +122,7 @@ Core() :
nextBackupId_(0),
coreWidget_(0)
{
//init logFile
logStream_ = 0;
logFile_ = 0;
......
......@@ -129,6 +129,7 @@ void Core::slotObjectSelectionChanged( int _id )
// just inform the plugins as we dont do anything else
emit objectSelectionChanged(_id);
// std::cerr << "objectSelection changed triggers updatedObjects for now" << std::endl;
// emit updatedObject(_id);
}
......
......@@ -55,6 +55,8 @@
//== INCLUDES =================================================================
#include "Types.hh"
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
//== TYPEDEFS =================================================================
......@@ -78,6 +80,13 @@ BaseObject::BaseObject(const BaseObject& _object) {
///@todo Maybe copy per Object Data
dataMap_.clear();
// If the pointer is 0 then we are creating the objectroot
if ( PluginFunctions::objectRoot() ) {
setParent(PluginFunctions::objectRoot());
PluginFunctions::objectRoot()->appendChild(this);
}
}
BaseObject::BaseObject(BaseObject* _parent) :
......@@ -91,6 +100,13 @@ BaseObject::BaseObject(BaseObject* _parent) :
{
id_ = idGenerator;
++ idGenerator;
// If the pointer is 0 then we are creating the objectroot
if ( PluginFunctions::objectRoot() ) {
setParent(PluginFunctions::objectRoot());
PluginFunctions::objectRoot()->appendChild(this);
}
}
BaseObject::~BaseObject() {
......
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