]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix alignment problem with text crescendi
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 26 Feb 2008 17:04:51 +0000 (18:04 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 27 Feb 2008 14:42:38 +0000 (15:42 +0100)
Text crescendi starting at skips caused a
"Programmierfehler: Improbable offset for stencil: nan staff space"
error message and moved the text crescendi to the very beginning of the
staff.
Instead of grob->extent(...), use robust_relative_extent (grob, ...), which
also works with skips.

Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
lily/line-spanner.cc

index e9f18461a133b332eb204f2aef3288ca93c6387e..7c629297387815c90809610f2144e52517943e9e 100644 (file)
@@ -100,7 +100,7 @@ Line_spanner::calc_bound_info (SCM smob, Direction dir)
        }
       
       details = scm_acons (ly_symbol2scm ("X"),
-                          scm_from_double (bound_grob->extent (commonx, X_AXIS)
+                          scm_from_double (robust_relative_extent (bound_grob, commonx, X_AXIS)
                                            .linear_combination (attach)),
                           details);
     }
@@ -343,7 +343,7 @@ Line_spanner::print (SCM smob)
   line.translate (Offset (-me->relative_coordinate (commonx, X_AXIS),
                          -me->relative_coordinate (my_common_y, Y_AXIS)));
                          
-    
+
   return line.smobbed_copy ();
 }