1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-02 06:08:44 +01:00

TrackShifters decide what parts move or stay fixed...

... for now redundantly with the older logic.

Also shorten a function name to Init
This commit is contained in:
Paul Licameli
2020-09-11 11:44:55 -04:00
parent c279fb6588
commit eb22892064
5 changed files with 130 additions and 8 deletions

View File

@@ -1329,6 +1329,21 @@ public:
return HitTestResult::Intervals;
}
void SelectInterval( const TrackInterval &interval ) override
{
UnfixIntervals( [&](auto &myInterval){
// Use a slightly different test from CommonSelectInterval, rounding times
// to exact samples according to the clip's rate
auto data =
static_cast<WaveTrack::IntervalData*>( myInterval.Extra() );
auto clip = data->GetClip().get();
return !(clip->IsClipStartAfterClip(interval.Start()) ||
clip->BeforeClip(interval.End()));
});
}
bool SyncLocks() override { return true; }
private:
std::shared_ptr<WaveTrack> mpTrack;
};