1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-19 06:07:42 +02:00

Fixed bug (ASSERT) when adding a click track after adding a chirp (and unselecting) when sync-lock is enabled.

This commit is contained in:
james.k.crook@gmail.com 2013-09-18 20:55:04 +00:00
parent 238bb1594c
commit fe3e0b7699

View File

@ -892,7 +892,10 @@ bool WaveTrack::SyncLockAdjust(double oldT1, double newT1)
if (newT1 > oldT1) {
// Insert space within the track
if (oldT1 > GetEndTime())
// JKC: This is a rare case where using >= rather than > on a float matters.
// GetEndTime() looks through the clips and may give us EXACTLY the same
// value as T1, when T1 was set to be at the end of one of those clips.
if (oldT1 >= GetEndTime())
return true;
// If track is empty at oldT1 insert whitespace; otherwise, silence