]> 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:04:12 +0000 (16:04 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 1 Dec 2006 15:04:12 +0000 (16:04 +0100)
placement. Fixes #20.

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 4161e8df3bb7abec73327b0aea23d3869015f342..db505c694bf845432b84bbddf8596aca18d52ea7 100644 (file)
@@ -353,8 +353,8 @@ Accidental_placement::calc_positioning_done (SCM smob)
     {
       int very_large = INT_MAX;
       
-      head_extents.push_back (Box (heads[i]->extent (common[X_AXIS], X_AXIS),
-                                  heads[i]->pure_height (common[Y_AXIS], 0, very_large)));
+      head_extents.push_back (Box (stems[i]->extent (common[X_AXIS], X_AXIS),
+                                  stems[i]->pure_height (common[Y_AXIS], 0, very_large)));
     }
 
   head_ape->left_skyline_ = Skyline (head_extents, Y_AXIS, LEFT);