From 4b5ee47d4471df0481ca7f52a0991c098cb8ae1d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 21 Feb 2008 19:51:41 +0000 Subject: Fix ruler scale on initial view (apply patch from nick_m). git-svn-id: svn://localhost/ardour2/branches/3.0@3101 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_rulers.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gtk2_ardour/editor_rulers.cc') diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc index b18e917c85..cb3ef7d45e 100644 --- a/gtk2_ardour/editor_rulers.cc +++ b/gtk2_ardour/editor_rulers.cc @@ -802,8 +802,8 @@ Editor::update_ruler_visibility () time_canvas_event_box.show_all(); time_button_frame.show_all(); - compute_current_bbt_points (leftmost_frame, leftmost_frame + (nframes_t)(canvas_width * frames_per_unit)); - compute_bbt_ruler_scale (leftmost_frame, leftmost_frame + (nframes_t)(canvas_width * frames_per_unit)); + compute_current_bbt_points (leftmost_frame, leftmost_frame + (nframes_t)(edit_packer.get_width() * frames_per_unit)); + compute_bbt_ruler_scale (leftmost_frame, leftmost_frame + (nframes_t)(edit_packer.get_width() * frames_per_unit)); redisplay_tempo (false); } @@ -833,11 +833,11 @@ Editor::compute_fixed_ruler_scale () } if (ruler_shown[ruler_metric_smpte]) { - set_smpte_ruler_scale (leftmost_frame, leftmost_frame + (canvas_width * frames_per_unit) ); + set_smpte_ruler_scale (leftmost_frame, leftmost_frame + (edit_packer.get_width() * frames_per_unit) ); } if (ruler_shown[ruler_metric_minsec]) { - set_minsec_ruler_scale (leftmost_frame, leftmost_frame + (canvas_width * frames_per_unit) ); + set_minsec_ruler_scale (leftmost_frame, leftmost_frame + (edit_packer.get_width() * frames_per_unit) ); } } -- cgit v1.2.3