lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

toward-stem-shift-in-column should only consider 'script-interface (issu


From: david . nalesnik
Subject: toward-stem-shift-in-column should only consider 'script-interface (issue 207620043 by address@hidden)
Date: Mon, 09 Mar 2015 15:40:17 +0000

Reviewers: ,

Message:
Please review.  Thanks.

Description:
toward-stem-shift-in-column should only consider 'script-interface

Previously, toward-stem-shift-in-column did not discriminate between
different types of grobs in the 'scripts grob-array.  This meant that
TextScript, StringNumber, and Fingering objects would be caught as well.
This patch only shifts an articulation in the presence of another Script
grob.

Please review this at https://codereview.appspot.com/207620043/

Affected files (+8, -1 lines):
  M scm/output-lib.scm


Index: scm/output-lib.scm
diff --git a/scm/output-lib.scm b/scm/output-lib.scm
index 96456b1b77fb436ae4a90b6b7ae851c30fa01678..23de7381f62b4c8d8d1c0186e6f33bffd2d9d01f 100644
--- a/scm/output-lib.scm
+++ b/scm/output-lib.scm
@@ -1187,7 +1187,14 @@ parent or the parent has no setting."
   (let* ((shift-when-alone (ly:grob-property grob 'toward-stem-shift 0.0))
(shift-in-column (ly:grob-property grob 'toward-stem-shift-in-column))
          (script-column (ly:grob-object grob 'script-column))
- (shift (if (and (ly:grob? script-column) (number? shift-in-column))
+         (shift (if (and (ly:grob? script-column)
+                         (number? shift-in-column)
+ ;; ScriptColumn can contain grobs other than Script. These
+                         ;; should not result in a shift.
+                         (any (lambda (s)
+                                (and (not (eq? s grob))
+ (grob::has-interface s 'script-interface))) + (ly:grob-array->list (ly:grob-object script-column 'scripts))))
                     shift-in-column shift-when-alone))
          (note-head-location
           (ly:self-alignment-interface::aligned-on-x-parent grob))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]