1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-15 09:01:12 +01:00

Bug 2363 - Double-click-selecting a clip partly selects clip before too

This commit is contained in:
James Crook
2020-03-21 22:54:15 +00:00
parent 37c8a6ef23
commit a072e21b77
3 changed files with 13 additions and 2 deletions

View File

@@ -474,6 +474,16 @@ bool WaveClip::AfterClip(double t) const
return ts > GetEndSample() + mAppendBufferLen;
}
// A sample at time t could be in the clip, but
// a clip start at time t still be from a clip
// not overlapping this one, with this test.
bool WaveClip::IsClipStartAfterClip(double t) const
{
auto ts = (sampleCount)floor(t * mRate + 0.5);
return ts >= GetEndSample() + mAppendBufferLen;
}
///Delete the wave cache - force redraw. Thread-safe
void WaveClip::ClearWaveCache()
{