* MIDI control lanes: Set Interpolationtype according to Parameter
[ardour.git] / gtk2_ardour / audio_region_view.cc
index e3dd980eee93f8b3d4e4b94aa8c3de086eeaa3bc..2a6bd2e1fe9f259015b5ccb61c10a8c0a42233f3 100644 (file)
@@ -161,7 +161,7 @@ AudioRegionView::init (Gdk::Color& basic_color, bool wfd)
                store_flags ();
        }
 
-       if (trackview.editor.new_regionviews_display_gain()) {
+       if (trackview.editor().new_regionviews_display_gain()) {
                _flags |= EnvelopeVisible;
        }
 
@@ -251,9 +251,7 @@ AudioRegionView::~AudioRegionView ()
 
        /* all waveviews etc will be destroyed when the group is destroyed */
 
-       if (gain_line) {
-               delete gain_line;
-       }
+       delete gain_line;
 }
 
 boost::shared_ptr<ARDOUR::AudioRegion>
@@ -998,7 +996,7 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
 
        item->w2i (x, y);
 
-       nframes_t fx = trackview.editor.pixel_to_frame (x);
+       nframes_t fx = trackview.editor().pixel_to_frame (x);
 
        if (fx > _region->length()) {
                return;
@@ -1006,8 +1004,8 @@ AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
 
        /* compute vertical fractional position */
 
-       y = 1.0 - (y / (trackview.current_height() - NAME_HIGHLIGHT_SIZE));
-       
+       y = 1.0 - (y / (_height - NAME_HIGHLIGHT_SIZE));
+
        /* map using gain line */
 
        gain_line->view_to_model_y (y);