]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #576.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 23 Feb 2008 23:51:21 +0000 (20:51 -0300)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 23 Feb 2008 23:51:21 +0000 (20:51 -0300)
Reverse the order when copying alists to other alists.  This maintains
the order of properties, making sure overrides have their intended
effects.

input/regression/text-spanner-override-order.ly [new file with mode: 0644]
lily/line-spanner.cc

diff --git a/input/regression/text-spanner-override-order.ly b/input/regression/text-spanner-override-order.ly
new file mode 100644 (file)
index 0000000..fee3357
--- /dev/null
@@ -0,0 +1,27 @@
+\header {
+
+  texidoc = "The order of setting nested properties does not influence
+  text spanner layout."
+
+}
+
+\version "2.11.34"
+
+sample = \relative c'' {
+  c2\startTextSpan c2 \break
+  c2 c2 \stopTextSpan
+}
+
+<< {
+  \override TextSpanner #'bound-details #'left-broken #' text =
+    \markup { \large "BROKEN" }
+  \override TextSpanner #'bound-details #'left #'text =
+    \markup { "text" }
+  \sample
+} \\ {
+  \override TextSpanner #'bound-details #'left #'text =
+    \markup { "text" }
+  \override TextSpanner #'bound-details #'left-broken #' text =
+    \markup { \large "BROKEN" }
+  \sample
+} >>
index 7d8cea10d6d702977057c59bccaf263285098bd3..7066c3de25b9fe62b238b219bd1053213794ff6e 100644 (file)
@@ -63,7 +63,7 @@ Line_spanner::calc_bound_info (SCM smob, Direction dir)
                                ? ly_symbol2scm ("left-broken")
                                : ly_symbol2scm ("right-broken"), bound_details, SCM_EOL);
 
-      for (SCM s = extra; scm_is_pair (s); s = scm_cdr (s))
+      for (SCM s = scm_reverse (extra); scm_is_pair (s); s = scm_cdr (s))
        details = scm_cons (scm_car (s), details);
     }