missing template dir patch from tim, fix extend selection to track when track is...
[ardour.git] / gtk2_ardour / editor_canvas.cc
index 8f6203c40da9b7ea5fd6f1195c1a57d7ee79657e..4a1fc10b9c1926a2b8a5363f68257be871e78e44 100644 (file)
@@ -294,7 +294,6 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc)
 bool
 Editor::track_canvas_idle ()
 {
-
        if (canvas_idle_queued) {
                canvas_idle_queued = false;
        }
@@ -302,6 +301,27 @@ Editor::track_canvas_idle ()
        canvas_width = canvas_allocation.get_width();
        canvas_height = canvas_allocation.get_height();
 
+       full_canvas_height = canvas_height;
+
+       if (session) {
+               TrackViewList::iterator i;
+               double height = 0;
+
+               for (i = track_views.begin(); i != track_views.end(); ++i) {
+                       if ((*i)->control_parent) {
+                               height += (*i)->effective_height;
+                               height += track_spacing;
+                       }
+               }
+               
+               if (height) {
+                       height -= track_spacing;
+               }
+
+               full_canvas_height = height;
+       }
+
+
        zoom_range_clock.set ((nframes_t) floor ((canvas_width * frames_per_unit)));
        edit_cursor->set_position (edit_cursor->current_frame);
        playhead_cursor->set_position (playhead_cursor->current_frame);