Commit 0cbd4e65 authored by Mike Kremer's avatar Mike Kremer

Performing call of objectDeleted(int) slot BEFORE the actual object is deleted.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10236 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 5037ac41
......@@ -1438,6 +1438,8 @@ void Core::slotDeleteObject( int _id ){
std::cerr << "Error while deleting object, does not exist!!" << std::endl;
return;
}
emit objectDeleted(_id);
// remove the whole subtree below this item
object->deleteSubtree();
......@@ -1448,8 +1450,6 @@ void Core::slotDeleteObject( int _id ){
// delete it
delete object;
emit objectDeleted(_id);
slotObjectUpdated(-1);
}
......@@ -1464,14 +1464,14 @@ void Core::slotDeleteAllObjects( ){
ids.push_back( current->id() );
current = current->next();
}
// remove the whole subtree below the root
objectRoot_->deleteSubtree();
for ( uint i = 0 ; i < ids.size(); ++i ) {
emit objectDeleted(ids[i]);
}
// remove the whole subtree below the root
objectRoot_->deleteSubtree();
slotObjectUpdated(-1);
}
......
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