diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-07 21:22:27 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-07 21:22:27 +0000 |
commit | 9c21f0774cdd0317909c0f8f06b4b0f6ca8a9051 (patch) | |
tree | 4566e76bc545cfb4b002ba8e704429f527c0815b | |
parent | 1a680ddc13517e32c0c658488279a95730dd3348 (diff) |
crossfade point dragging fix from markus s.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5751 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/crossfade_edit.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc index b57a8ccfb5..124b650ee3 100644 --- a/gtk2_ardour/crossfade_edit.cc +++ b/gtk2_ardour/crossfade_edit.cc @@ -496,6 +496,18 @@ CrossfadeEditor::add_control_point (double x, double y) void CrossfadeEditor::Point::move_to (double nx, double ny, double xfract, double yfract) { + if ( xfract < 0.0 ) { + xfract = 0.0; + } else if ( xfract > 1.0 ) { + xfract = 1.0; + } + + if ( yfract < 0.0 ) { + yfract = 0.0; + } else if ( yfract > 1.0 ) { + yfract = 1.0; + } + const double half_size = rint(size/2.0); double x1 = nx - half_size; double x2 = nx + half_size; |