summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_canvas.cc
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2008-10-18 12:51:48 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2008-10-18 12:51:48 +0000
commit97e678dfe3b1950b6ab4b18998e1b0cfacf0c053 (patch)
treead554ad0e8b7630d576c3c85f261865ef270f483 /gtk2_ardour/editor_canvas.cc
parent9b49147d3ad92f7a9343bdd2a5637c4d349df421 (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.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3981 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r--gtk2_ardour/editor_canvas.cc23
1 files changed, 8 insertions, 15 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index 7b1eca282f..6373810678 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -324,20 +324,20 @@ Editor::track_canvas_size_allocated ()
}
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);
+ }
}
handle_new_duration ();
reset_hscrollbar_stepping ();
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);
- }
Resized (); /* EMIT_SIGNAL */
@@ -836,13 +836,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