Fix MIDI selection/tool issues (issue #0002415 and other bugs).
[ardour.git] / libs / ardour / automation_event.cc
index a3edc9dcde8adce29ccb259a7e59e735a611de1f..af390953f424aa660b773efa64501a130e2f85f4 100644 (file)
@@ -55,6 +55,7 @@ static void dumpit (const AutomationList& al, string prefix = "")
 }
 #endif
 
+/* XXX: min_val max_val redundant? (param.min() param.max()) */
 AutomationList::AutomationList (Parameter id, double min_val, double max_val, double default_val)
        : _parameter(id)
        , _interpolation(Linear)
@@ -1210,7 +1211,7 @@ AutomationList::rt_safe_earliest_event_linear_unlocked (double start, double end
 
                x = first->when + (y - first->value) / (double)slope;
                
-               while ((inclusive && x < start) || x <= start && y != next->value) {
+               while ((inclusive && x < start) || (x <= start && y != next->value)) {
                        
                        if (first->value < next->value) // ramping up
                                y += 1.0;