Undoable add/remove bar (#6347)
* Undoable add/remove bar * Don't add checkpoints to empty tracks Authored by: Spekular <Spekular@users.noreply.github.com>
This commit is contained in:
@@ -775,10 +775,11 @@ void Song::stopExport()
|
||||
void Song::insertBar()
|
||||
{
|
||||
m_tracksMutex.lockForRead();
|
||||
for( TrackList::const_iterator it = tracks().begin();
|
||||
it != tracks().end(); ++it )
|
||||
for (Track* track: tracks())
|
||||
{
|
||||
( *it )->insertBar( m_playPos[Mode_PlaySong] );
|
||||
// FIXME journal batch of tracks instead of each track individually
|
||||
if (track->numOfClips() > 0) { track->addJournalCheckPoint(); }
|
||||
track->insertBar(m_playPos[Mode_PlaySong]);
|
||||
}
|
||||
m_tracksMutex.unlock();
|
||||
}
|
||||
@@ -789,10 +790,11 @@ void Song::insertBar()
|
||||
void Song::removeBar()
|
||||
{
|
||||
m_tracksMutex.lockForRead();
|
||||
for( TrackList::const_iterator it = tracks().begin();
|
||||
it != tracks().end(); ++it )
|
||||
for (Track* track: tracks())
|
||||
{
|
||||
( *it )->removeBar( m_playPos[Mode_PlaySong] );
|
||||
// FIXME journal batch of tracks instead of each track individually
|
||||
if (track->numOfClips() > 0) { track->addJournalCheckPoint(); }
|
||||
track->removeBar(m_playPos[Mode_PlaySong]);
|
||||
}
|
||||
m_tracksMutex.unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user