Commit 2bd3f1b7 authored by Dirk Wilden's avatar Dirk Wilden

clearAll / deleteAllObjects changed

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6061 383ad7c9-94d9-4d36-a494-682f7c89f535
parent bac08817
......@@ -760,9 +760,10 @@ void Core::setMaxFrameRate( int _rate ) {
void
Core::clearAll()
{
objectRoot_->deleteSubtree();
slotDeleteAllObjects();
emit allCleared();
emit signalObjectUpdated(-1);
slotScriptInfo( "core" , "clearAll()" );
}
......@@ -1245,9 +1246,12 @@ void Core::slotDeleteAllObjects( ){
// Remember ids
std::vector< int > ids;
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ;
o_it != PluginFunctions::objectsEnd(); ++o_it) {
ids.push_back( o_it->id() );
BaseObject* current = objectRoot_->next();
while( current != objectRoot_ ){
ids.push_back( current->id() );
current = current->next();
}
// remove the whole subtree below the root
......
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