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

Method redo

src/core/ProjectJournal.cpp:81–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79
80
81void 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
104bool ProjectJournal::canUndo() const
105{

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