]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/grob.cc (pure_height): only add minimum-Y-extent if we
authorJoe Neeman <joeneeman@gmail.com>
Tue, 10 Oct 2006 08:32:59 +0000 (08:32 +0000)
committerJoe Neeman <joeneeman@gmail.com>
Tue, 10 Oct 2006 08:32:59 +0000 (08:32 +0000)
already have a non-empty extent. Fixes estimation for Hara-kiri
staves.

ChangeLog
lily/grob.cc

index 6019f22c116ba8cfec239a54a66c2d7617e0e053..6fb278ed4a954fc88ad3efb08e6fb3da3d3e24b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-10  Joe Neeman  <joeneeman@gmail.com>
+
+       * 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  <reuter@ipd.uka.de>
 
        * ly/gregorian-init.ly: Simplify definition of \episemInitium and
index 3e98a5b90a48ed87198158f30cbcf81d0e60d677..dd8726cac8bdc972324dc54391dcf6b7e4142072 100644 (file)
@@ -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);