]> git.donarmstrong.com Git - lilypond.git/commitdiff
Look at stem extents iso. head extents in 2nd loop for accidental
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 1 Dec 2006 15:48:47 +0000 (16:48 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 1 Dec 2006 15:48:47 +0000 (16:48 +0100)
placement. Fixes #20.
(cherry picked from c16791d9bf61125932e672ff6e99698508b78785 commit)

input/regression/accidental-collision.ly [new file with mode: 0644]
lily/accidental-placement.cc

diff --git a/input/regression/accidental-collision.ly b/input/regression/accidental-collision.ly
new file mode 100644 (file)
index 0000000..eeb03d5
--- /dev/null
@@ -0,0 +1,10 @@
+\header {
+  texidoc = "accidentals avoid stems of other notes too."
+  }
+
+\version "2.10.1"
+
+\paper {
+  ragged-right  = ##t
+  }
+\new Staff \relative <<bes' \\ a'>>
index 02f0c522a2367ceb9c71b23a2dad9f0b8d0f482b..2aea5056799c62367e618f1ec3c57d321ad2b56c 100644 (file)
@@ -364,8 +364,8 @@ Accidental_placement::calc_positioning_done (SCM smob)
     {
       int very_large = INT_MAX;
       
-      Box b (heads[i]->extent (common[X_AXIS], X_AXIS),
-            heads[i]->pure_height (common[Y_AXIS], 0, very_large));
+      Box b (stems[i]->extent (common[X_AXIS], X_AXIS),
+            stems[i]->pure_height (common[Y_AXIS], 0, very_large));
 
       insert_extent_into_skyline (&head_skyline, b, Y_AXIS, LEFT);
     }