Skip to content
Snippets Groups Projects
Commit c540a95d authored by Jan Möbius's avatar Jan Möbius
Browse files

Emit object updates for all objects in scene, if -1 is given as updated object

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15759 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 717ec640
No related branches found
No related tags found
No related merge requests found
......@@ -98,10 +98,30 @@ void Core::slotObjectUpdated(int _identifier, const UpdateType& _type) {
}
}
// just inform the plugins as we dont do anything else (Do deprecated and new updatedObjects here)
// If the identifier is -1 we force an update of all objects in the scene (Bad idea for scenes with many objects)
if ( _identifier == -1 ) {
std::cerr << "Warning, updated object called with -1" << std::endl;
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS,DATA_ALL ) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
// just inform the plugins as we don't do anything else (Do deprecated and new updatedObjects here)
emit signalObjectUpdated(o_it->id());
emit signalObjectUpdated(o_it->id(), _type);
// Call the objects update function
o_it->update();
}
} else {
// just inform the plugins as we don't do anything else (Do deprecated and new updatedObjects here)
emit signalObjectUpdated(_identifier);
emit signalObjectUpdated(_identifier, _type);
}
// If we have an single object, call it's update function
if ( object != 0 )
object->update(_type);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment