From: Neil Puttock Date: Wed, 24 Jun 2009 22:25:48 +0000 (+0100) Subject: Fix #767. X-Git-Tag: release/2.12.3-1~79 X-Git-Url: https://git.donarmstrong.com/lilypond.git?a=commitdiff_plain;h=81abebcfecdb22d2e7b6b8e2a6d9f758aa45a13a;p=lilypond.git Fix #767. - 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) --- diff --git a/input/regression/collision-harmonic-no-dots.ly b/input/regression/collision-harmonic-no-dots.ly new file mode 100644 index 0000000000..8fe383c67b --- /dev/null +++ b/input/regression/collision-harmonic-no-dots.ly @@ -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' { + << + { 2. } + \\ + { e2. } + >> + r4 +} diff --git a/lily/rhythmic-head.cc b/lily/rhythmic-head.cc index 5919c9119b..659ba339b7 100644 --- a/lily/rhythmic-head.cc +++ b/lily/rhythmic-head.cc @@ -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 "