1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-07 04:01:54 +01:00

Fix more cases of Wave and Note track editing wrongly throwing

This commit is contained in:
Paul Licameli
2017-04-29 21:41:38 -04:00
parent baf46c1f85
commit 8bfe4cc685
2 changed files with 4 additions and 4 deletions

View File

@@ -435,7 +435,7 @@ int NoteTrack::GetVisibleChannels()
Track::Holder NoteTrack::Cut(double t0, double t1)
{
if (t1 <= t0)
if (t1 < t0)
THROW_INCONSISTENCY_EXCEPTION;
double len = t1-t0;
@@ -458,7 +458,7 @@ Track::Holder NoteTrack::Cut(double t0, double t1)
Track::Holder NoteTrack::Copy(double t0, double t1, bool) const
{
if (t1 <= t0)
if (t1 < t0)
THROW_INCONSISTENCY_EXCEPTION;
double len = t1-t0;
@@ -481,7 +481,7 @@ Track::Holder NoteTrack::Copy(double t0, double t1, bool) const
bool NoteTrack::Trim(double t0, double t1)
{
if (t1 <= t0)
if (t1 < t0)
return false;
mSeq->convert_to_seconds();
// DELETE way beyond duration just in case something is out there: