projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a680dd
)
crossfade point dragging fix from markus s.
author
Paul Davis
<paul@linuxaudiosystems.com>
Wed, 7 Oct 2009 21:22:27 +0000
(21:22 +0000)
committer
Paul Davis
<paul@linuxaudiosystems.com>
Wed, 7 Oct 2009 21:22:27 +0000
(21:22 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@5751
d708f5d6
-7413-0410-9779-
e7cbd77b26cf
gtk2_ardour/crossfade_edit.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/crossfade_edit.cc
b/gtk2_ardour/crossfade_edit.cc
index b57a8ccfb5d88e6c695fde7252c74ccde8b0d821..124b650ee31f0533fb211818cd858f13bb876c0c 100644
(file)
--- 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;