diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-17 02:48:24 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-17 02:48:24 +0000 |
commit | 54d00408c3a1d36899fdd8b4f085aa2a2946009e (patch) | |
tree | 9bfa7a6827ef1a815ff969717d8b8dcfdeba6673 /gtk2_ardour/crossfade_edit.cc | |
parent | f5c4c8a2931f383c76212ea1cfdb6f85f43bb72f (diff) |
forward port 2.X changes up to and including rev 6842
git-svn-id: svn://localhost/ardour2/branches/3.0@7637 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/crossfade_edit.cc')
-rw-r--r-- | gtk2_ardour/crossfade_edit.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc index ecb7b8a1f8..b6dcf07920 100644 --- a/gtk2_ardour/crossfade_edit.cc +++ b/gtk2_ardour/crossfade_edit.cc @@ -419,15 +419,16 @@ CrossfadeEditor::point_event (GdkEvent* event, Point* point) if (point_grabbed) { double new_x, new_y; - /* can't drag first or last points horizontally */ + /* can't drag first or last points horizontally or vertically */ if (point == fade[current].points.front() || point == fade[current].points.back()) { new_x = point->x; + new_y = point->y; } else { new_x = (event->motion.x - canvas_border)/effective_width(); + new_y = 1.0 - ((event->motion.y - canvas_border)/effective_height()); } - new_y = 1.0 - ((event->motion.y - canvas_border)/effective_height()); point->move_to (x_coordinate (new_x), y_coordinate (new_y), new_x, new_y); redraw (); |