| 54 | |
| 55 | |
| 56 | void ProjectJournal::undo() |
| 57 | { |
| 58 | while( !m_undoCheckPoints.isEmpty() ) |
| 59 | { |
| 60 | CheckPoint c = m_undoCheckPoints.pop(); |
| 61 | JournallingObject *jo = m_joIDs[c.joID]; |
| 62 | |
| 63 | if( jo ) |
| 64 | { |
| 65 | DataFile curState( DataFile::JournalData ); |
| 66 | jo->saveState( curState, curState.content() ); |
| 67 | m_redoCheckPoints.push( CheckPoint( c.joID, curState ) ); |
| 68 | |
| 69 | bool prev = isJournalling(); |
| 70 | setJournalling( false ); |
| 71 | jo->restoreState( c.data.content().firstChildElement() ); |
| 72 | setJournalling( prev ); |
| 73 | Engine::getSong()->setModified(); |
| 74 | break; |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | |
| 80 |
nothing calls this directly
no test coverage detected