mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 00:03:52 +02:00
Envelope bug
This commit is contained in:
committed by
Paul Licameli
parent
cb48ca2b91
commit
dcceaca13c
@@ -125,6 +125,7 @@ class Envelope final : public XMLTagHandler {
|
|||||||
|
|
||||||
// Handling Cut/Copy/Paste events
|
// Handling Cut/Copy/Paste events
|
||||||
void CollapseRegion(double t0, double t1);
|
void CollapseRegion(double t0, double t1);
|
||||||
|
// Takes absolute times, NOT offset-relative:
|
||||||
void CopyFrom(const Envelope * e, double t0, double t1);
|
void CopyFrom(const Envelope * e, double t0, double t1);
|
||||||
void Paste(double t0, const Envelope *e);
|
void Paste(double t0, const Envelope *e);
|
||||||
void InsertSpace(double t0, double tlen);
|
void InsertSpace(double t0, double tlen);
|
||||||
|
|||||||
@@ -1397,7 +1397,9 @@ bool WaveClip::CreateFromCopy(double t0, double t1, const WaveClip* other)
|
|||||||
}
|
}
|
||||||
|
|
||||||
mEnvelope = std::make_unique<Envelope>();
|
mEnvelope = std::make_unique<Envelope>();
|
||||||
mEnvelope->CopyFrom(other->mEnvelope.get(), (double)s0/mRate, (double)s1/mRate);
|
mEnvelope->CopyFrom(other->mEnvelope.get(),
|
||||||
|
mOffset + (double)s0/mRate,
|
||||||
|
mOffset + (double)s1/mRate);
|
||||||
|
|
||||||
MarkChanged();
|
MarkChanged();
|
||||||
|
|
||||||
@@ -1546,6 +1548,7 @@ bool WaveClip::ClearAndAddCutLine(double t0, double t1)
|
|||||||
if (clip_t1 > GetEndTime())
|
if (clip_t1 > GetEndTime())
|
||||||
clip_t1 = GetEndTime();
|
clip_t1 = GetEndTime();
|
||||||
|
|
||||||
|
newClip->SetOffset(this->mOffset);
|
||||||
if (!newClip->CreateFromCopy(clip_t0, clip_t1, this))
|
if (!newClip->CreateFromCopy(clip_t0, clip_t1, this))
|
||||||
return false;
|
return false;
|
||||||
newClip->SetOffset(clip_t0-mOffset);
|
newClip->SetOffset(clip_t0-mOffset);
|
||||||
|
|||||||
Reference in New Issue
Block a user