MCPcopy Create free account
hub / github.com/LMMS/lmms / undo

Method undo

src/core/ProjectJournal.cpp:56–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55
56void 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

Callers

nothing calls this directly

Calls 10

CheckPointClass · 0.85
isJournallingFunction · 0.85
setJournallingFunction · 0.85
getSongFunction · 0.85
setModifiedMethod · 0.80
isEmptyMethod · 0.45
popMethod · 0.45
saveStateMethod · 0.45
pushMethod · 0.45
restoreStateMethod · 0.45

Tested by

no test coverage detected