Fix bug reported by Axel Müller on the list where marker bars, canvas and playhead get kind of out of sync with the timeline (partial reversion of an earlier commit).

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5154 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge 2009-06-10 17:29:10 +00:00
parent 139df10405
commit b4b2a23271

View file

@ -824,19 +824,18 @@ Editor::tie_vertical_scrolling ()
void
Editor::scroll_canvas_horizontally ()
{
nframes64_t time_origin = (nframes64_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
/* horizontal scrolling only */
double x_delta;
double x1, y1, x2, y2, x_delta;
_master_group->get_bounds (x1, y1, x2, y2);
x_delta = (leftmost_frame - time_origin) / frames_per_unit;
x_delta = - (x1 + horizontal_adjustment.get_value());
_master_group->move (x_delta, 0);
timebar_group->move (x_delta, 0);
time_line_group->move (x_delta, 0);
cursor_group->move (x_delta, 0);
leftmost_frame = time_origin;
leftmost_frame = (nframes64_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
update_fixed_rulers ();
redisplay_tempo (true);