1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-14 09:03:54 +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

@@ -108,13 +108,13 @@ namespace
void AddClipsToCaptured
( ClipMoveState &state, Track *t, double t0, double t1 )
{
bool exclude = true;
bool exclude = true; // to exclude a whole track.
auto &clips = state.capturedClipArray;
t->TypeSwitch(
[&](WaveTrack *wt) {
exclude = false;
for(const auto &clip: wt->GetClips())
if ( ! clip->AfterClip(t0) && ! clip->BeforeClip(t1) &&
if ( ! clip->IsClipStartAfterClip(t0) && ! clip->BeforeClip(t1) &&
// Avoid getting clips that were already captured
! std::any_of( clips.begin(), clips.end(),
[&](const TrackClip &c) { return c.clip == clip.get(); } ) )