diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-16 15:33:04 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-16 15:33:04 +0000 |
commit | 6ef5d85ae1f2c500c4163cd1df580b3f26991c1e (patch) | |
tree | 15194a52bb72f036117fc4c87c193a4cbb64be8b /gtk2_ardour/crossfade_edit.cc | |
parent | 830911f6f9451d83a58043b3f9084d3caa164b7b (diff) |
changes from 2.X starting in march 2009 through oct 20 2009 (5826 inclusive)
git-svn-id: svn://localhost/ardour2/branches/3.0@6761 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/crossfade_edit.cc')
-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 c1201f2f9a..726194c41b 100644 --- a/gtk2_ardour/crossfade_edit.cc +++ b/gtk2_ardour/crossfade_edit.cc @@ -497,6 +497,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; |