13
0

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

View File

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