From 85acf35337e73a1382a1ce3f1fa02470d75e487a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 5 Jan 2011 02:28:28 +0000 Subject: Disable follow-playhead during drags. Fixes #3647. git-svn-id: svn://localhost/ardour2/branches/3.0@8444 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_drag.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gtk2_ardour/editor_drag.cc') diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 809f797175..77c68faf96 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -91,6 +91,8 @@ DragManager::abort () _drags.clear (); + _editor->set_follow_playhead (_old_follow_playhead); + _ending = false; } @@ -112,6 +114,10 @@ DragManager::set (Drag* d, GdkEvent* e, Gdk::Cursor* c) void DragManager::start_grab (GdkEvent* e, Gdk::Cursor* c) { + /* Prevent follow playhead during the drag to be nice to the user */ + _old_follow_playhead = _editor->follow_playhead (); + _editor->set_follow_playhead (false); + _current_pointer_frame = _editor->event_frame (e, &_current_pointer_x, &_current_pointer_y); for (list::const_iterator i = _drags.begin(); i != _drags.end(); ++i) { @@ -139,6 +145,8 @@ DragManager::end_grab (GdkEvent* e) _drags.clear (); _ending = false; + + _editor->set_follow_playhead (_old_follow_playhead, false); return r; } -- cgit v1.2.3