summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-01-05 02:28:28 +0000
committerCarl Hetherington <carl@carlh.net>2011-01-05 02:28:28 +0000
commit85acf35337e73a1382a1ce3f1fa02470d75e487a (patch)
tree5fc10c780a9298fd7adff4e498e32592e9ba09ff /gtk2_ardour/editor_drag.cc
parentd13cb3bd40b5d5ae54c3adfcf952e6f965e51d08 (diff)
Disable follow-playhead during drags. Fixes #3647.
git-svn-id: svn://localhost/ardour2/branches/3.0@8444 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r--gtk2_ardour/editor_drag.cc8
1 files changed, 8 insertions, 0 deletions
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<Drag*>::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;
}