Commit 9a40c1f7 authored by Dirk Wilden's avatar Dirk Wilden

copyObject now emits the right signals

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5519 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c3a68463
......@@ -83,6 +83,7 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
void addContextMenuItem(QAction* _action , DataType _objectType , ContextMenuType _type );
// LoadSaveInterface
void deleteObject( int _id );
void emptyObjectAdded( int _id );
private slots :
// BaseInterface
void pluginsInitialized();
......
......@@ -129,8 +129,10 @@ int DataControlPlugin::copyObject( int objectId ) {
if ( newObject == -1 )
std::cerr << "Unable to copy object" << std::endl;
else
else{
emit emptyObjectAdded(newObject);
emit updatedObject(newObject);
}
return newObject;
}
......
......@@ -142,10 +142,14 @@ void DataControlPlugin::slotCopy() {
BaseObject* copyItem = model_->getItem( indexList[i] );
// remove the whole subtree below this item
if ( PluginFunctions::copyObject(copyItem->id()) == -1 ) {
int newObject = PluginFunctions::copyObject(copyItem->id());
if ( newObject == -1 ) {
emit log(LOGERR, "Unable to copy object" );
continue;
} else {
emit emptyObjectAdded( newObject );
emit updatedObject( newObject );
}
}
......
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