summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas.cc
diff options
context:
space:
mode:
authorSampo Savolainen <v2@iki.fi>2006-12-04 22:18:21 +0000
committerSampo Savolainen <v2@iki.fi>2006-12-04 22:18:21 +0000
commit317af79f13d60811d8942c943a7b081b913da0a0 (patch)
treee80511a784571ee74375bcf76ffe2651901f78bd /gtk2_ardour/editor_canvas.cc
parentf599eefa998c9b971b797bbecc53cb49f1d3ca3c (diff)
Drag zoom area now fills the whole canvas
git-svn-id: svn://localhost/ardour2/trunk@1188 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r--gtk2_ardour/editor_canvas.cc22
1 files changed, 21 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index 8f6203c40d..4a1fc10b9c 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -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);