sort tempo curves initially as well.
authornick_m <mainsbridge@gmail.com>
Sun, 11 Dec 2016 15:03:19 +0000 (02:03 +1100)
committernick_m <mainsbridge@gmail.com>
Sun, 11 Dec 2016 15:07:00 +0000 (02:07 +1100)
gtk2_ardour/editor_tempodisplay.cc

index ea95b5bb43a998c2bfa85d2df2d2b02a16589da2..4463ec825b6cf200b45016b91a8267fe9c049de7 100644 (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 ()
 {