1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-02 17:23:18 +02:00

Bug 1890 - Enh: Punch and Roll fails when splice point is at track end

This commit is contained in:
James Crook 2018-08-12 11:34:08 +01:00
parent 3886113b91
commit d59ed9026b

View File

@ -8657,8 +8657,10 @@ void AudacityProject::OnPunchAndRoll(const CommandContext &WXUNUSED(context))
sampleCount testSample(floor(t1 * wt->GetRate()));
auto clip = wt->GetClipAtSample(testSample);
if (!clip)
// Subtract 1 to allow a selection exactly at the end time
clip = wt->GetClipAtSample(testSample - 1);
// Bug 1890 (an enhancement request)
// Try again, a little to the left.
// Subtract 10 to allow a selection exactly at or slightly after the end time
clip = wt->GetClipAtSample(testSample - 10);
if (!clip)
error = true;
else {