| 79 | |
| 80 | |
| 81 | void ProjectJournal::redo() |
| 82 | { |
| 83 | while( !m_redoCheckPoints.isEmpty() ) |
| 84 | { |
| 85 | CheckPoint c = m_redoCheckPoints.pop(); |
| 86 | JournallingObject *jo = m_joIDs[c.joID]; |
| 87 | |
| 88 | if( jo ) |
| 89 | { |
| 90 | DataFile curState( DataFile::JournalData ); |
| 91 | jo->saveState( curState, curState.content() ); |
| 92 | m_undoCheckPoints.push( CheckPoint( c.joID, curState ) ); |
| 93 | |
| 94 | bool prev = isJournalling(); |
| 95 | setJournalling( false ); |
| 96 | jo->restoreState( c.data.content().firstChildElement() ); |
| 97 | setJournalling( prev ); |
| 98 | Engine::getSong()->setModified(); |
| 99 | break; |
| 100 | } |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | bool ProjectJournal::canUndo() const |
| 105 | { |
nothing calls this directly
no test coverage detected