]> git.donarmstrong.com Git - lilypond.git/commitdiff
Removes excess padding from BarLine extra-spacing-height function.
authorMike Solomon <mike@apollinemike.com>
Fri, 9 Dec 2011 09:11:47 +0000 (10:11 +0100)
committerMike Solomon <mike@apollinemike.com>
Fri, 9 Dec 2011 09:11:47 +0000 (10:11 +0100)
scm/output-lib.scm

index 048e84db3037ab3c96a64d0430f90c6d01c364fd..3e2d5ff5201e9a103e49b08b8aa61983c91270fe 100644 (file)
@@ -406,20 +406,15 @@ and duration-log @var{log}."
     (coord-operation - from-neighbors height)))
 
 (define-public (pure-from-neighbor-interface::account-for-span-bar grob)
-  (define (other-op x) (x (cons cdr car)))
   (let* ((esh (pure-from-neighbor-interface::extra-spacing-height grob))
-         (hsb (ly:grob-property grob 'has-span-bar)))
+         (hsb (ly:grob-property grob 'has-span-bar))
+         (ii (interval-intersection esh (cons -1.01 1.01))))
     (if (pair? hsb)
-      (cons-map
-        (lambda (x)
-          (if (and ((other-op x) hsb)
-                   (not (and (eq? x car)
-                             (not (ly:grob-property grob 'allow-span-bar)))))
-              (x esh)
-              (x (cons -1.01 1.01))))
-        (cons car cdr))
-      ;; sufficient height to prevent ledger lines from moving over/under
-      '(-1.01 . 1.01))))
+        (cons (car (if (and (cdr hsb)
+                       (ly:grob-property grob 'allow-span-bar))
+                       esh ii))
+              (cdr (if (car hsb) esh ii)))
+        ii)))
 
 (define-public (pure-from-neighbor-interface::extra-spacing-height-including-staff grob)
   (let ((esh (pure-from-neighbor-interface::extra-spacing-height grob))