diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-25 20:30:32 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-25 20:30:32 +0000 |
commit | b7757ddd7007b6382fbd89ba02ddc525b3a57543 (patch) | |
tree | b1d5a2f1b907b30649d9c701982100b96e8c42d2 /gtk2_ardour/editor_mouse.cc | |
parent | ce6c41c060c700489a9ac9fc5080bf2920c17ae2 (diff) |
changes to autoscroll behaviour. not perfect, but probably better
git-svn-id: svn://localhost/trunk/ardour2@533 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 50527f51d6..1409da77a9 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -1104,28 +1104,6 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT return false; } -void -Editor::maybe_autoscroll (GdkEvent* event) -{ - jack_nframes_t rightmost_frame = leftmost_frame + current_page_frames(); - - jack_nframes_t frame = drag_info.current_pointer_frame; - - cerr << "maybe autoscroll @ " << frame << " left = " << leftmost_frame << " right = " << rightmost_frame << endl; - - if (frame > rightmost_frame) { - if (rightmost_frame < max_frames) { - autoscroll_direction = 1; - autoscroll_canvas (); - } - } else if (frame < leftmost_frame) { - if (leftmost_frame > 0) { - autoscroll_direction = -1; - autoscroll_canvas (); - } - } -} - bool Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type) { @@ -1497,13 +1475,14 @@ Editor::motion_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item &drag_info.current_pointer_y); if (!from_autoscroll && drag_info.item) { - /* item != 0 is the best test i can think of for - dragging. + /* item != 0 is the best test i can think of for dragging. */ if (!drag_info.move_threshold_passsed) { + drag_info.move_threshold_passsed = (abs ((int) (drag_info.current_pointer_x - drag_info.grab_x)) > 4); // and change the initial grab loc/frame if this drag info wants us to + if (drag_info.want_move_threshold && drag_info.move_threshold_passsed) { drag_info.grab_frame = drag_info.current_pointer_frame; drag_info.grab_x = drag_info.current_pointer_x; @@ -2785,8 +2764,6 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event) vector<int32_t> height_list(512) ; vector<int32_t>::iterator j; - cerr << "region motion to " << drag_info.current_pointer_frame << endl; - /* Which trackview is this ? */ TimeAxisView* tvp = trackview_by_y_position (drag_info.current_pointer_y); |