diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2008-10-19 07:55:42 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2008-10-19 07:55:42 +0000 |
commit | b1c48972f2914b49d45a7cef2b38a0a125bd731e (patch) | |
tree | cede5da093267aae1b496e3d17e8104455150cda /gtk2_ardour/editor_canvas.cc | |
parent | 063ab23465759839eb723c20664cbfe388701fda (diff) |
Handle changed session duration & resizing canvas better wrt end marker, remove unused last_canvas_frame, don't redraw the entire mixer every time its presented, consistent space between rightmost horizontal scroller position and end marker when zooming, possible fix for gaps in tempo lines.
git-svn-id: svn://localhost/ardour2/branches/3.0@3982 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index a1930e58d7..f0a016d039 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -340,6 +340,17 @@ Editor::track_canvas_size_allocated () for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) { (*x)->set_line_vpos (0, canvas_height); } + + vertical_adjustment.set_page_size (canvas_height); + last_trackview_group_vertical_offset = get_trackview_group_vertical_offset (); + if ((vertical_adjustment.get_value() + canvas_height) >= vertical_adjustment.get_upper()) { + /* + We're increasing the size of the canvas while the bottom is visible. + We scroll down to keep in step with the controls layout. + */ + vertical_adjustment.set_value (full_canvas_height - canvas_height + 1); + } + } @@ -348,15 +359,6 @@ Editor::track_canvas_size_allocated () update_fixed_rulers(); redisplay_tempo (false); - last_trackview_group_vertical_offset = get_trackview_group_vertical_offset (); - if ((vertical_adjustment.get_value() + canvas_height) >= vertical_adjustment.get_upper()) { - /* - We're increasing the size of the canvas while the bottom is visible. - We scroll down to keep in step with the controls layout. - */ - vertical_adjustment.set_value (full_canvas_height - canvas_height + 1); - } - Resized (); /* EMIT_SIGNAL */ return false; @@ -866,12 +868,6 @@ void Editor::canvas_scroll_to (nframes64_t time_origin) { leftmost_frame = time_origin; - nframes64_t rightmost_frame = leftmost_frame + current_page_frames (); - - if (rightmost_frame > last_canvas_frame) { - last_canvas_frame = rightmost_frame; - //reset_scrolling_region (); - } } void |