]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #767.
authorNeil Puttock <n.puttock@gmail.com>
Wed, 24 Jun 2009 22:25:48 +0000 (23:25 +0100)
committerPatrick McCarty <pnorcks@gmail.com>
Fri, 17 Jul 2009 09:53:04 +0000 (02:53 -0700)
- in Rhythmic_head::dot_count () use robust_scm2int to ensure sane
  value is returned even if Dots isn't live.
(cherry picked from commit 6538e1b152ea115bf70e83f89627c07477472e53)

input/regression/collision-harmonic-no-dots.ly [new file with mode: 0644]
lily/rhythmic-head.cc

diff --git a/input/regression/collision-harmonic-no-dots.ly b/input/regression/collision-harmonic-no-dots.ly
new file mode 100644 (file)
index 0000000..8fe383c
--- /dev/null
@@ -0,0 +1,17 @@
+\version "2.13.2"
+
+\header {
+  texidoc = "Collision resolution involving dotted harmonic heads
+succeeds when dots are hidden since @code{rhythmic-head-interface}
+will only retrieve @code{'dot-count} from live grobs.
+"
+}
+
+\relative c' {
+  <<
+    { <fis\harmonic>2. }
+    \\
+    { e2. }
+  >>
+  r4
+}
index 5919c9119b90e3545d8503f2804c7ce2d4ca81fa..659ba339b7be5ff29f52004cfc7a52089f787ca3 100644 (file)
@@ -8,11 +8,11 @@
 
 #include "rhythmic-head.hh"
 
-#include "warn.hh"
+#include "item.hh"
 #include "rest.hh"
-#include "stem.hh"
 #include "staff-symbol-referencer.hh"
-#include "item.hh"
+#include "stem.hh"
+#include "warn.hh"
 
 Item *
 Rhythmic_head::get_dots (Grob *me)
@@ -32,7 +32,7 @@ int
 Rhythmic_head::dot_count (Grob *me)
 {
   return get_dots (me)
-    ? scm_to_int (get_dots (me)->get_property ("dot-count")) : 0;
+    ? robust_scm2int (get_dots (me)->get_property ("dot-count"), 0) : 0;
 }
 
 void
@@ -50,7 +50,7 @@ Rhythmic_head::duration_log (Grob *me)
 
 ADD_INTERFACE (Rhythmic_head,
               "Note head or rest.",
-              
+
               /* properties */
               "dot "
               "duration-log "