]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix inverted sign on relative offset for beam-collisions.
authorHan-Wen Nienhuys <hanwen@lilypond.org>
Fri, 18 Mar 2011 02:17:14 +0000 (23:17 -0300)
committerHan-Wen Nienhuys <hanwen@lilypond.org>
Fri, 18 Mar 2011 02:19:02 +0000 (23:19 -0300)
This fixes #1565.

input/regression/beam-collision-cross-staff.ly [new file with mode: 0644]
lily/beam.cc

diff --git a/input/regression/beam-collision-cross-staff.ly b/input/regression/beam-collision-cross-staff.ly
new file mode 100644 (file)
index 0000000..d546aaf
--- /dev/null
@@ -0,0 +1,12 @@
+\header {
+  texidoc = "cross staff beams work with collisions."
+}
+
+\version "2.13.55"
+
+<< 
+ \new Staff = "PianoRH" s4.
+ \new Staff = "PianoLH" {
+   d''8 [b''! \change Staff = "PianoRH"  d'' ]
+ }
+>>
index e3135dadfa92609362dccfd467e5f164dde1bde7..6fbd71d7d6a6d4ddcda0a7fbd7782f8e6eef43c4 100644 (file)
@@ -1276,7 +1276,7 @@ Beam::shift_region_to_valid (SCM grob, SCM posns)
               left_y -= dy;
 
               // Translate back to beam as ref point.
-              left_y -= -me->relative_coordinate (common[Y_AXIS], Y_AXIS);
+              left_y -= me->relative_coordinate (common[Y_AXIS], Y_AXIS);
             
               Interval allowed;
               allowed.set_full ();