1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-05 03:03:10 +01:00

Update envelope properly for TimeTrack and WaveTrack editing...

... Formerly this was done correctly only for cut and delete from WaveTrack,
paste into WaveTrack, and sync-lock adjustment of WaveTrack (either lengthening
or shortening).

Now also properly done for TimeTrack cut and paste, and also for:

Split cut
Split delete
Trim
This commit is contained in:
Paul Licameli
2017-05-03 08:48:24 -04:00
parent 2d84c65c94
commit aba52bc79e
5 changed files with 58 additions and 44 deletions

View File

@@ -22,6 +22,7 @@
#include "widgets/Ruler.h"
#include "Envelope.h"
#include "Prefs.h"
#include "Project.h"
#include "Internat.h"
#include "ViewInfo.h"
#include "AllThemeResources.h"
@@ -108,7 +109,8 @@ Track::Holder TimeTrack::Copy( double t0, double t1, bool ) const
void TimeTrack::Clear(double t0, double t1)
{
mEnvelope->CollapseRegion(t0, t1);
auto sampleTime = 1.0 / GetActiveProject()->GetRate();
mEnvelope->CollapseRegion( t0, t1, sampleTime );
}
void TimeTrack::Paste(double t, const Track * src)