From dce3dbe2e2b4650e95f508109c814ec46fd56110 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 23 Feb 2008 20:51:21 -0300 Subject: [PATCH] Fix #576. Reverse the order when copying alists to other alists. This maintains the order of properties, making sure overrides have their intended effects. --- .../regression/text-spanner-override-order.ly | 27 +++++++++++++++++++ lily/line-spanner.cc | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 input/regression/text-spanner-override-order.ly 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); } -- 2.39.5