- for (SCM s = ss; scm_is_pair (s); s = scm_cdr (s))
- {
- Grob *g = unsmob_grob (scm_car (s));
- if (last)
- {
- 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; 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))
- g->set_property ("outside-staff-priority",
- scm_from_double (
- scm_to_double (last_outside_staff) + 0.1));
- else if (scm_to_double (g_outside_staff) -
- robust_scm2double (default_outside_staff, 0)) < 0.001)
- {
- SCM last_script = last->get_property ("script-priority");
- SCM g_script = g->get_property ("script-priority");
- g->set_property (
- "outside-staff-priority",
- scm_from_double (scm_to_double (last_outside_staff) +
- scm_to_double (g_script) -
- scm_to_double (last_script)));
- }
- default_outside_staff = g_outside_staff;
- }
- else
- Side_position_interface::add_support (g, last);
- }
- last = g;
- }