From: Joe Neeman Date: Tue, 10 Oct 2006 08:32:59 +0000 (+0000) Subject: * lily/grob.cc (pure_height): only add minimum-Y-extent if we X-Git-Tag: release/2.10.0-2~207 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d166feaecfc29a2df7827db259006d943f8fe0e4;p=lilypond.git * lily/grob.cc (pure_height): only add minimum-Y-extent if we already have a non-empty extent. Fixes estimation for Hara-kiri staves. --- diff --git a/ChangeLog b/ChangeLog index 6019f22c11..6fb278ed4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-10 Joe Neeman + + * lily/grob.cc (pure_height): only add minimum-Y-extent if we + already have a non-empty extent. Fixes estimation for Hara-kiri + staves. + 2006-10-09 Jürgen Reuter * ly/gregorian-init.ly: Simplify definition of \episemInitium and diff --git a/lily/grob.cc b/lily/grob.cc index 3e98a5b90a..dd8726cac8 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -425,7 +425,11 @@ Grob::pure_height (Grob *refp, int start, int end) Real offset = pure_relative_y_coordinate (refp, start, end); SCM min_ext = get_property ("minimum-Y-extent"); - if (is_number_pair (min_ext)) + + /* we don't add minimum-Y-extent if the extent is empty. This solves + a problem with Hara-kiri spanners. They would request_suicide and + return empty extents, but we would force them here to be large. */ + if (!iv.is_empty () && is_number_pair (min_ext)) iv.unite (ly_scm2interval (min_ext)); iv.translate (offset);