]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix 1152.
authorJoe Neeman <joeneeman@gmail.com>
Sat, 26 Jun 2010 09:00:29 +0000 (12:00 +0300)
committerJoe Neeman <joeneeman@gmail.com>
Sat, 26 Jun 2010 09:05:20 +0000 (12:05 +0300)
Ensure that the voice-based positioning of a rest is used for
horizontal spacing, even if there is a Rest_collision involved.

input/regression/spacing-accidental-rest.ly [new file with mode: 0644]
scm/define-grobs.scm

diff --git a/input/regression/spacing-accidental-rest.ly b/input/regression/spacing-accidental-rest.ly
new file mode 100644 (file)
index 0000000..aec60b9
--- /dev/null
@@ -0,0 +1,8 @@
+\version "2.13.25"
+
+\header {
+  texidoc = "Accidentals don't collide with shifted-down rests."
+}
+
+\new Staff << g'4 \\ {r8 aeses} >>
+
index 778c0cfdc12c3658925f0ae090b95901d385d5ba..a76dd3165582fdb28763dfc450982464cd90e361 100644 (file)
          (else
           '(0 . 0)))))
 
+;; Sometimes, a pure callback will be chained to a non-pure callback via
+;; chain_offset_callback, in which case this provides a default by simply
+;; passing through the value from the pure callback.
+(define (pure-chain-offset-callback grob start end prev-offset) prev-offset)
+
 (define pure-conversions-alist
   `(
     (,ly:accidental-interface::height . ,ly:accidental-interface::pure-height)
     (,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
     (,ly:grob::stencil-height . ,pure-stencil-height)
     (,ly:hara-kiri-group-spanner::y-extent . ,ly:hara-kiri-group-spanner::pure-height)
+    (,ly:rest-collision::force-shift-callback-rest . ,pure-chain-offset-callback)
     (,ly:rest::height . ,ly:rest::pure-height)
     (,ly:self-alignment-interface::y-aligned-on-self . ,ly:self-alignment-interface::pure-y-aligned-on-self)
     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)