From 12ffa283905d46bac16462b5199da1b7645d4e2a Mon Sep 17 00:00:00 2001 From: Nick Mainsbridge Date: Thu, 23 Oct 2008 13:24:14 +0000 Subject: Reinstate ZoomFocusMenu and KeyMouseActions, fix odd horizontal scroller behaviour (thanks dooooomi). git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4000 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor.cc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'gtk2_ardour/editor.cc') diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 63026a0d59..02d33a4c11 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -4331,6 +4331,7 @@ Editor::set_frames_per_unit (double fpu) void Editor::post_zoom () { + nframes64_t cef=0; /* // convert fpu to frame count @@ -4361,6 +4362,12 @@ Editor::post_zoom () ZoomChanged (); /* EMIT_SIGNAL */ reset_hscrollbar_stepping (); + + if (session) { + cef = session->current_end_frame() + (current_page_frames() / 10);// Add a little extra so we can see the end marker + } + horizontal_adjustment.set_upper (cef / frames_per_unit); + //reset_scrolling_region (); instant_save (); @@ -4409,21 +4416,11 @@ Editor::idle_visual_changer () if (p & VisualChange::TimeOrigin) { - nframes64_t csf=0, cef=0; nframes64_t current_time_origin = (nframes64_t) floor (horizontal_adjustment.get_value() * frames_per_unit); - if (session) { - csf = session->current_start_frame(); - cef = session->current_end_frame(); - } - - /* if we seek beyond the current end of the canvas, move the end */ + horizontal_adjustment.set_value (pending_visual_change.time_origin / frames_per_unit); if (current_time_origin != pending_visual_change.time_origin) { - cef += current_page_frames() / 10; // Add a little extra so we can see the end marker - horizontal_adjustment.set_upper (cef / frames_per_unit); - horizontal_adjustment.set_value (pending_visual_change.time_origin / frames_per_unit); - } else { update_fixed_rulers(); redisplay_tempo (true); } -- cgit v1.2.3