Commit 4cbfd7c2 authored by Jan Möbius's avatar Jan Möbius

handle objectSelectionChanged in core

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7797 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a301ef1e
......@@ -132,13 +132,6 @@ class BaseInterface {
*/
virtual void nodeVisibilityChanged( int /*_identifier*/ ) {};
/** \brief The object selection has been changed by this plugin
*
* This signal is used to tell the other plugins that the object selection (source/target) has been changed.\n
*
*/
virtual void objectSelectionChanged( int /*_identifier*/ ) {};
/** \brief Object properties have been changed
*
* This signal is used to tell the other plugins that the object properties (e.g. name ) have changed
......
......@@ -754,8 +754,6 @@ void Core::openIniFile( QString _filename,
// Tell plugins to load their per object settings
emit iniLoad( ini,object->id() );
// Tell plugins that the object selection changed
emit objectSelectionChanged( object->id() );
}
}
......
......@@ -277,29 +277,17 @@ void Core::backupRequest( int _id , QString _name ) {
/// This slot is called by the object manager when a new object is created
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(slotObjectSelectionChanged(int)) );
// return;
// }
BaseObject* baseObject = 0;
PluginFunctions::getObject(_objectId,baseObject);
if ( baseObject ) {
std::cerr << "Base Object specific connects" << std::endl;
connect( baseObject, SIGNAL(visibilityChanged(int)),this,SLOT(slotObjectSelectionChanged(int)) );
// connect( baseObject, SIGNAL(objectSelectionChanged(int)),this,SLOT(slotObjectSelectionChanged(int)) );
connect( baseObject, SIGNAL(visibilityChanged(int)), this, SLOT(slotObjectSelectionChanged(int)) );
connect( baseObject, SIGNAL(objectSelectionChanged(int)),this, SLOT(slotObjectSelectionChanged(int)) );
} else {
emit log(LOGERR,tr("newObject received from objectManager with invalid id! This should not happen. The new Object will not work correctly!"));
}
// std::cerr << "Core Objectmanager" << std::endl;
}
......
......@@ -524,8 +524,10 @@ void Core::loadPlugin(QString filename, bool silent){
connect(this,SIGNAL(allCleared()),plugin,SLOT(slotAllCleared()));
if ( checkSignal(plugin,"objectSelectionChanged(int)") )
connect(plugin,SIGNAL(objectSelectionChanged(int)),this,SLOT(slotObjectSelectionChanged(int) ));
if ( checkSignal(plugin,"objectSelectionChanged(int)") ) {
emit log (LOGERR,tr("Signal objectSelectionChanged(in) is deprecated!") );
emit log (LOGERR,tr("If the selection for an object is changed, the core will emit the required signals itself!") );
}
if ( checkSlot( plugin , "slotObjectSelectionChanged(int)" ) )
connect(this,SIGNAL(objectSelectionChanged(int)),plugin,SLOT(slotObjectSelectionChanged(int) ));
......
......@@ -439,7 +439,6 @@ void Core::slotObjectOpened ( int _id ) {
// Tell plugins, that the Object is updated and the active object has changed
// ================================================================================
emit signalObjectUpdated(_id);
emit objectSelectionChanged( _id );
// ================================================================================
// Create initial backup
......@@ -487,7 +486,6 @@ void Core::slotEmptyObjectAdded ( int _id ) {
// Tell the Plugins that the Object List and the active object have changed
emit signalObjectUpdated(_id);
emit objectSelectionChanged(_id);
backupRequest(_id,"Original Object");
......
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