From e59facb5816992f0d81fa6b594503165d7a3b025 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 19 Sep 2008 14:27:30 +0000 Subject: [PATCH] fix range dragging post-multi-marker changes git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3759 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_mouse.cc | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index b5dffffc07..6cef53a685 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -2394,10 +2394,25 @@ Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event) if (real_location->is_mark()) { f_delta = newframe - copy_location->start(); - } else if (newframe < copy_location->end()) { - f_delta = newframe - copy_location->end(); } else { - f_delta = newframe - copy_location->start (); + + + switch (marker->type()) { + case Marker::Start: + case Marker::LoopStart: + case Marker::PunchIn: + f_delta = newframe - copy_location->start(); + break; + + case Marker::End: + case Marker::LoopEnd: + case Marker::PunchOut: + f_delta = newframe - copy_location->end(); + break; + default: + /* what kind of marker is this ? */ + return; + } } break; }