most of the 2.X->3.0 commit (up to rev 4299) except for gtk2_ardour/editor_canvas...
[ardour.git] / gtk2_ardour / streamview.cc
index 8730c55f58fd16dec9ece4063d7c760d8f2c890d..9658af06fcf78a4c033a595ce432f3ddee9fd8a9 100644 (file)
@@ -48,6 +48,7 @@ using namespace Editing;
 StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Group* group)
        : _trackview (tv)
        , owns_canvas_group(group == 0)
+       , _background_group(new ArdourCanvas::Group(*_trackview.canvas_background))
        , canvas_group(group ? group : new ArdourCanvas::Group(*_trackview.canvas_display))
        , _samples_per_unit(_trackview.editor.get_current_zoom())
        , rec_updating(false)
@@ -62,10 +63,10 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Group* group)
 {
        /* set_position() will position the group */
 
-       canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
+       canvas_rect = new ArdourCanvas::SimpleRect (*_background_group);
        canvas_rect->property_x1() = 0.0;
        canvas_rect->property_y1() = 0.0;
-       canvas_rect->property_x2() = _trackview.editor.frame_to_pixel (max_frames - 1);
+       canvas_rect->property_x2() = _trackview.editor.get_physical_screen_width();
        canvas_rect->property_y2() = (double) tv.current_height();
        canvas_rect->raise(1); // raise above tempo lines
 
@@ -301,10 +302,8 @@ StreamView::region_layered (RegionView* rv)
 {
        /* don't ever leave it at the bottom, since then it doesn't
           get events - the  parent group does instead ...
-          we need to raise it above the streamview's 
-          canvas_rect, hence the layer+1 here
        */
-       rv->get_canvas_group()->raise (rv->region()->layer() + 1);
+       rv->get_canvas_group()->raise (rv->region()->layer());
 }
 
 void