]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/regression/property-grace-polyphony.ly: new file.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 22 Mar 2004 22:57:40 +0000 (22:57 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 22 Mar 2004 22:57:40 +0000 (22:57 +0000)
* lily/translator-property.cc (execute_pushpop_property): only pop
one instance of the property. This fixes << \\ >> together with
\grace.

ChangeLog
input/regression/property-grace-polyphony.ly [new file with mode: 0644]
lily/translator-property.cc
ly/engraver-init.ly
scm/music-functions.scm

index eccd595f384e9d2d8b13c8613ac041a28e737cb9..77833b1211893ec490e9511281b83bab57e4f5b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2004-03-22  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * input/regression/property-grace-polyphony.ly: new file.
+
+       * lily/translator-property.cc (execute_pushpop_property): only pop
+       one instance of the property. This fixes << \\ >> together with
+       \grace.
+
        * lily/break-align-interface.cc (ordered_elements): we cannot
        modify the #'elements property, so return reordered array.
 
diff --git a/input/regression/property-grace-polyphony.ly b/input/regression/property-grace-polyphony.ly
new file mode 100644 (file)
index 0000000..3e0f877
--- /dev/null
@@ -0,0 +1,17 @@
+
+\header {
+
+    texidoc = "Property overrides and reverts from @code{\\grace} do
+    not interfere with the overrides and reverts from polyphony."
+
+}
+
+\version "2.1.32"
+\score {
+  \notes \relative c'' {
+      <<
+         { \grace e8 d2 }
+         \\ { a2 } >>
+  }
+}
+
index 4d7a8016d31e4e9aaa6da509452fde5e8c079809..de977343fc295dbf282c3d726dc1aed55b871879 100644 (file)
@@ -88,18 +88,25 @@ execute_pushpop_property (Context * trg,
 
          while (prev_alist != daddy)
            {
-             if (!gh_equal_p (gh_caar (prev_alist), eltprop))
+             if (gh_equal_p (gh_caar (prev_alist), eltprop))
                {
-                 *tail = gh_cons (gh_car (prev_alist), daddy);
-                 tail = SCM_CDRLOC (*tail);
+                 prev_alist = gh_cdr (prev_alist);
+                 break ;
                }
+
+             
+             *tail = gh_cons (gh_car (prev_alist), SCM_EOL);
+             tail = SCM_CDRLOC (*tail);
              prev_alist = gh_cdr (prev_alist);
            }
 
-         if (new_alist == SCM_EOL)
+         if (new_alist == SCM_EOL && prev_alist == daddy)
            trg->unset_property (prop);
          else
-           trg->internal_set_property (prop, gh_cons (new_alist, daddy));
+           {
+             *tail = prev_alist;
+             trg->internal_set_property (prop, gh_cons (new_alist, daddy));
+           }
        }
     }
   else
index 3dec9753f18a7e61c3cd511743d83606c602ad76..8283cfe962ab341a2df4ffdcf0521e447429551e 100644 (file)
@@ -531,7 +531,6 @@ AncientRemoveEmptyStaffContext = \context {
     metronomeMarkFormatter = #format-metronome-markup
     graceSettings = #`#(
        (Voice Stem direction 1)
-
        ;; TODO: should take from existing definition.
        ;; c&p from define-grobs.scm
        
index d9ce891e75db7f929c81cecf5ed3dc1b929ad03f..be08cbef4244cb7f1a5a008712615b622570fa16 100644 (file)
@@ -182,7 +182,8 @@ i.e.  this is not an override"
              'grob-property gprop))
 
 (define direction-polyphonic-grobs
-  '(Tie Rest Slur Script TextScript Stem Dots DotColumn))
+  '(Stem Tie Rest Slur Script TextScript Dots DotColumn
+        ))
 
 (define-public (make-voice-props-set n)
   (make-sequential-music
@@ -190,9 +191,12 @@ i.e.  this is not an override"
     (map (lambda (x) (make-grob-property-set x 'direction
                                             (if (odd? n) -1 1)))
         direction-polyphonic-grobs)
-    (list (make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n 2))
-         (make-grob-property-set 'MultiMeasureRest 'staff-position
-                                 (if (odd? n) -4 4))))))
+    (list
+     (make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n 2))
+     (make-grob-property-set 'MultiMeasureRest 'staff-position (if (odd? n) -4 4))
+     
+     )))) 
+
 
 (define-public (make-voice-props-revert)
   (make-sequential-music