Can't call the wrong function when there's only one of them: remove ARDOUR::Parameter...
[ardour.git] / gtk2_ardour / automation_region_view.cc
index 7b43f2f0af772884c8806cf87c0e4b8409c2c91d..d8b90e6458a0377d572c88af371cfc9e086e59ca 100644 (file)
@@ -26,7 +26,7 @@
 AutomationRegionView::AutomationRegionView(ArdourCanvas::Group*                      parent,
                                            AutomationTimeAxisView&                   time_axis,
                                            boost::shared_ptr<ARDOUR::Region>         region,
-                                           const ARDOUR::Parameter&                  param,
+                                           const Evoral::Parameter&                  param,
                                            boost::shared_ptr<ARDOUR::AutomationList> list,
                                            double                                    spu,
                                            Gdk::Color&                               basic_color)
@@ -65,12 +65,12 @@ void
 AutomationRegionView::create_line (boost::shared_ptr<ARDOUR::AutomationList> list)
 {
        _line = boost::shared_ptr<AutomationLine>(new AutomationLine(
-                               list->parameter().symbol(), trackview, *get_canvas_group(), list));
+                               ARDOUR::EventTypeMap::instance().to_symbol(list->parameter()),
+                               trackview, *get_canvas_group(), list));
        _line->set_colors();
        _line->show();
        _line->show_all_control_points();
-       _line->set_y_position_and_height (trackview.y_position,
-               (uint32_t)rint(trackview.current_height() - NAME_HIGHLIGHT_SIZE));
+       _line->set_height ((uint32_t)rint(trackview.current_height() - NAME_HIGHLIGHT_SIZE));
 }
 
 bool
@@ -124,24 +124,13 @@ AutomationRegionView::add_automation_event (GdkEvent* event, nframes_t when, dou
        view->session().set_dirty ();
 }
 
-void
-AutomationRegionView::set_y_position_and_height (double y, double h)
-{
-       cout << "ARV SET Y POSITION AND HEIGHT: " << y << ", " << h << endl;
-       RegionView::set_y_position_and_height(y, h - 1);
-
-       if (_line)
-               _line->set_y_position_and_height (y, h - NAME_HIGHLIGHT_SIZE);
-}
-
 void
 AutomationRegionView::set_height (double h)
 {
-       cout << "ARV SET HEIGHT: " << h << endl;
        RegionView::set_height(h);
+
        if (_line)
-               _line->set_y_position_and_height (trackview.y_position - h,
-                               (uint32_t)rint(h - NAME_HIGHLIGHT_SIZE));
+               _line->set_height ((uint32_t)rint(h - NAME_HIGHLIGHT_SIZE));
 }
 
 bool