From: Carl Sorensen Date: Sat, 28 Nov 2009 03:42:11 +0000 (-0700) Subject: Fix 787 X-Git-Tag: release/2.13.9-1~64 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c4f84c5da3265130a60010eed5f9d32d0bc5e6e2;p=lilypond.git Fix 787 --- diff --git a/input/regression/script-stack-order.ly b/input/regression/script-stack-order.ly index cca3c7656c..ce6452082c 100644 --- a/input/regression/script-stack-order.ly +++ b/input/regression/script-stack-order.ly @@ -9,7 +9,7 @@ order determines the order. Objects specified first are closest to the note. \layout { ragged-right = ##t} -\relative c'' { c4^"inner up"^"outer up"_"inner down"_"outer down" } +\relative c'' { c4^"inner up"^"outer up"_"inner down"_"outer down" c c c} diff --git a/lily/script-column.cc b/lily/script-column.cc index 30e2b68f62..25c602eca5 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -116,7 +116,7 @@ Script_column::before_line_breaking (SCM smob) Side_position_interface::x_aligned_side_proc) staff_sided.push_back (sc); } - + order_grobs (staff_sided); return SCM_UNSPECIFIED; } @@ -145,19 +145,25 @@ Script_column::order_grobs (vector grobs) Grob *g = unsmob_grob (scm_car (s)); if (last) { - SCM outside_staff = last->get_property ("outside-staff-priority"); - if (scm_is_number (outside_staff)) + SCM last_outside_staff = last->get_property ("outside-staff-priority"); + if (scm_is_number (last_outside_staff)) { - /* we allow the outside-staff-priority ordering to override the - script-priority ordering */ - if (!scm_is_number (g->get_property ("outside-staff-priority"))) - g->set_property ("outside-staff-priority", - scm_from_double (scm_to_double (outside_staff) + 0.1)); + /* + we allow the outside-staff-priority ordering to override the + script-priority ordering; we must set new + outside-staff-priority if outside-staff-priority is + missing or equal to last + */ + SCM g_outside_staff = g->get_property ("outside-staff-priority"); + if ((!scm_is_number (g_outside_staff)) || + (fabs (scm_to_double (g_outside_staff) - + scm_to_double(last_outside_staff)) < 0.001)) + g->set_property ("outside-staff-priority", + scm_from_double (scm_to_double (last_outside_staff) + 0.1)); } else Side_position_interface::add_support (g, last); } - last = g; } } @@ -167,7 +173,7 @@ Script_column::order_grobs (vector grobs) ADD_INTERFACE (Script_column, "An interface that sorts scripts according to their" " @code{script-priority}.", - + /* properties */ "" );