::find_next_event() does not need to be a pure virtual in ControlSet (it can originat...
[ardour.git] / gtk2_ardour / automation_line.cc
index 9c1aa13198bc52c76dfbb2b9595d5c7491cad4ed..a97ab0df07b73496afe93d41dbc521bc9af434ac 100644 (file)
@@ -250,7 +250,7 @@ AutomationLine::set_line_color (uint32_t color)
        _line_color = color;
        line->set_outline_color (color);
 
-       ArdourCanvas::SVAModifier mod = UIConfiguration::instance().modifier ("automation line fill");
+       Gtkmm2ext::SVAModifier mod = UIConfiguration::instance().modifier ("automation line fill");
 
        line->set_fill_color ((color & 0xffffff00) + mod.a()*255);
 }
@@ -1056,14 +1056,21 @@ AutomationLine::reset ()
                return;
        }
 
+       /* TODO: abort any drags in progress, e.g. draging points while writing automation
+        * (the control-point model, used by AutomationLine::drag_motion, will be invalid).
+        *
+        * Note: reset() may also be called from an aborted drag (LineDrag::aborted)
+        * maybe abort in list_changed(), interpolation_changed() and ... ?
+        * XXX
+        */
+
        alist->apply_to_points (*this, &AutomationLine::reset_callback);
 }
 
 void
 AutomationLine::queue_reset ()
 {
-       /* this must be called from the GUI thread
-        */
+       /* this must be called from the GUI thread */
 
        if (trackview.editor().session()->transport_rolling() && alist->automation_write()) {
                /* automation write pass ... defer to a timeout */
@@ -1168,7 +1175,6 @@ AutomationLine::view_to_model_coord (double& x, double& y) const
 void
 AutomationLine::view_to_model_coord_y (double& y) const
 {
-#ifdef XXX_NEW_INTERPOLATON__BREAK_SESSION_FORMAT_XXX
        if (alist->default_interpolation () != alist->interpolation()) {
                switch (alist->interpolation()) {
                        case AutomationList::Linear:
@@ -1179,7 +1185,6 @@ AutomationLine::view_to_model_coord_y (double& y) const
                                break;
                }
        }
-#endif
        y = _desc.from_interface (y);
 }
 
@@ -1204,7 +1209,6 @@ AutomationLine::apply_delta (double& val, double delta) const
 void
 AutomationLine::model_to_view_coord_y (double& y) const
 {
-#ifdef XXX_NEW_INTERPOLATON__BREAK_SESSION_FORMAT_XXX
        if (alist->default_interpolation () != alist->interpolation()) {
                switch (alist->interpolation()) {
                        case AutomationList::Linear:
@@ -1215,7 +1219,6 @@ AutomationLine::model_to_view_coord_y (double& y) const
                                break;
                }
        }
-#endif
        y = _desc.to_interface (y);
 }