sort tempo curves initially as well.

This commit is contained in:
nick_m 2016-12-12 02:03:19 +11:00
parent 9598f2a811
commit 9c5e1ffb0d
1 changed files with 6 additions and 7 deletions

View File

@ -75,7 +75,11 @@ Editor::remove_metric_marks ()
}
tempo_curves.clear ();
}
struct CurveComparator {
bool operator() (TempoCurve const * a, TempoCurve const * b) {
return a->tempo().frame() < b->tempo().frame();
}
};
void
Editor::draw_metric_marks (const Metrics& metrics)
{
@ -121,6 +125,7 @@ Editor::draw_metric_marks (const Metrics& metrics)
}
}
tempo_curves.sort (CurveComparator());
const double min_tempo_range = 5.0;
const double tempo_delta = fabs (max_tempo - min_tempo);
@ -176,12 +181,6 @@ Editor::tempo_map_changed (const PropertyChange& /*ignored*/)
update_tempo_based_rulers ();
}
struct CurveComparator {
bool operator() (TempoCurve const * a, TempoCurve const * b) {
return a->tempo().frame() < b->tempo().frame();
}
};
void
Editor::marker_position_changed ()
{