diff options
author | Carl Hetherington <carl@carlh.net> | 2010-02-07 03:23:20 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-02-07 03:23:20 +0000 |
commit | 3ae1bd3723448deaa73cc189b16a814970f608eb (patch) | |
tree | ecc2db4018c660dacdfa609092f9acf19d2c9488 /gtk2_ardour/editor_canvas.cc | |
parent | 9daf5b81218f8fa1bfeb8b3070f24ad5d20e5278 (diff) |
Remove my attempts to autoscroll based on dragged region edges (rather than just pointer position); too many corner cases and not really worth the bother.
git-svn-id: svn://localhost/ardour2/branches/3.0@6645 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_canvas.cc')
-rw-r--r-- | gtk2_ardour/editor_canvas.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 031e58bf61..510b7e019f 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -548,7 +548,6 @@ void Editor::maybe_autoscroll (GdkEventMotion* event, bool allow_vert) { nframes64_t rightmost_frame = leftmost_frame + current_page_frames(); - pair<nframes64_t, nframes64_t> frames = _drags->extent (); bool startit = false; autoscroll_y = 0; @@ -561,19 +560,16 @@ Editor::maybe_autoscroll (GdkEventMotion* event, bool allow_vert) startit = true; } - if (frames.second > rightmost_frame) { - + if (_drags->current_pointer_frame() > rightmost_frame) { if (rightmost_frame < max_frames) { autoscroll_x = 1; startit = true; } - - } else if (frames.first < leftmost_frame) { + } else if (_drags->current_pointer_frame() < leftmost_frame) { if (leftmost_frame > 0) { autoscroll_x = -1; startit = true; } - } if (!allow_vertical_scroll) { @@ -609,12 +605,10 @@ Editor::autoscroll_canvas () if (autoscroll_x_distance != 0) { - pair<nframes64_t, nframes64_t> const e = _drags->extent (); - if (autoscroll_x > 0) { - autoscroll_x_distance = (e.second - (leftmost_frame + current_page_frames())) / 3; + autoscroll_x_distance = (_drags->current_pointer_frame() - (leftmost_frame + current_page_frames())) / 3; } else if (autoscroll_x < 0) { - autoscroll_x_distance = (leftmost_frame - e.first) / 3; + autoscroll_x_distance = (leftmost_frame - _drags->current_pointer_frame()) / 3; } } |