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:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user