Commit 40040a14 authored by Isaak Lim's avatar Isaak Lim
Browse files

fixed cppcheck warning

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15620 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 649af98d
......@@ -349,18 +349,20 @@ void BackupPlugin::slotUndo(int _objectid){
void BackupPlugin::slotUndo(){
GroupBackup* group = dynamic_cast< GroupBackup* >( globalBackup_.currentState() );
IdList ids = group->objectIDs();
IdList::const_iterator it, end;
for (it = ids.begin(), end = ids.end(); it != end; ++it)
emit aboutToRestore(*it);
if (group) {
IdList ids = group->objectIDs();
IdList::const_iterator it, end;
for (it = ids.begin(), end = ids.end(); it != end; ++it)
emit aboutToRestore(*it);
globalBackup_.undo();
globalBackup_.undo();
if ( group != 0)
for (unsigned int i=0; i < group->objectIDs().size(); i++)
emit updatedObject(group->objectIDs()[i], UPDATE_ALL);
updateButtons();
updateButtons();
} else
emit log(LOGWARN,"Unable to find the current GroupBackup");
}
//-----------------------------------------------------------------------------
......
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