From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Sat, 23 Feb 2008 23:51:21 +0000 (-0300)
Subject: Fix #576.
X-Git-Tag: release/2.11.41-1~12
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=dce3dbe2e2b4650e95f508109c814ec46fd56110;p=lilypond.git

Fix #576.

Reverse the order when copying alists to other alists.  This maintains
the order of properties, making sure overrides have their intended
effects.
---

diff --git a/input/regression/text-spanner-override-order.ly b/input/regression/text-spanner-override-order.ly
new file mode 100644
index 0000000000..fee3357621
--- /dev/null
+++ b/input/regression/text-spanner-override-order.ly
@@ -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
+} >>
diff --git a/lily/line-spanner.cc b/lily/line-spanner.cc
index 7d8cea10d6..7066c3de25 100644
--- a/lily/line-spanner.cc
+++ b/lily/line-spanner.cc
@@ -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);
     }