| 114 | |
| 115 | |
| 116 | void ProjectJournal::addJournalCheckPoint( JournallingObject *jo ) |
| 117 | { |
| 118 | if( isJournalling() ) |
| 119 | { |
| 120 | m_redoCheckPoints.clear(); |
| 121 | |
| 122 | DataFile dataFile( DataFile::JournalData ); |
| 123 | jo->saveState( dataFile, dataFile.content() ); |
| 124 | |
| 125 | m_undoCheckPoints.push( CheckPoint( jo->id(), dataFile ) ); |
| 126 | if( m_undoCheckPoints.size() > MAX_UNDO_STATES ) |
| 127 | { |
| 128 | m_undoCheckPoints.remove( 0, m_undoCheckPoints.size() - MAX_UNDO_STATES ); |
| 129 | } |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | |
| 134 |
no test coverage detected