From c9d269872e6e1fbaa946cae7efb99c6a23f0cc30 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Thu, 15 Jan 2009 18:57:58 +0000 Subject: [PATCH] Fixed a bug with dragging when the timeline is scrolled down --- src/gui/widgets/timeline/timeline-layout-helper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/widgets/timeline/timeline-layout-helper.cpp b/src/gui/widgets/timeline/timeline-layout-helper.cpp index 2d5f1d22b..a47097854 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.cpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.cpp @@ -139,7 +139,8 @@ TimelineLayoutHelper::begin_dragging_track( const Gdk::Rectangle &rect = headerBoxes[draggingTrack]; dragStartOffset = Gdk::Point( mouse_point.get_x() - rect.get_x(), - mouse_point.get_y() - rect.get_y()); + mouse_point.get_y() - rect.get_y() + + timelineWidget.get_y_scroll_offset()); // Find the track in the tree const shared_ptr model_track = @@ -187,7 +188,7 @@ TimelineLayoutHelper::drag_to_point(const Gdk::Point &point) const weak_ptr track = lookup_timeline_track(*iterator); - if(util::pt_in_rect(point, headerBoxes[track])) + if(util::pt_in_rect(dragPoint, headerBoxes[track])) { // Relocate the header draggingTrackIter = layoutTree.move_after(