X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Faxis-group-interface.cc;h=af3ddcb8a310b181e910845d7349e0610bf69f8d;hb=9e781b7dc83b60a543ce218aa1a5f139f74c760f;hp=7579ed8c1a3a93cebf9977df14b0d0dc237638a2;hpb=29d5e0a64d0eee69e4ebee1e76e4df26ae58190b;p=lilypond.git diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 7579ed8c1a..af3ddcb8a3 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2000--2012 Han-Wen Nienhuys + Copyright (C) 2000--2014 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -485,7 +485,7 @@ Axis_group_interface::calc_pure_relevant_grobs (SCM smob) } SCM -Axis_group_interface::internal_calc_pure_relevant_grobs (Grob *me, string grob_set_name) +Axis_group_interface::internal_calc_pure_relevant_grobs (Grob *me, const string &grob_set_name) { extract_grob_set (me, grob_set_name.c_str (), elts); @@ -494,16 +494,26 @@ Axis_group_interface::internal_calc_pure_relevant_grobs (Grob *me, string grob_s for (vsize i = 0; i < elts.size (); i++) { if (elts[i] && elts[i]->is_live ()) + relevant_grobs.push_back (elts[i]); + /* + TODO (mikesol): it is probably bad that we're reading prebroken + pieces from potentially suicided elements. This behavior + has been in current master since at least 2.16. + + We need to fully suicide all Items, meaning that their + prebroken pieces should not be accessible, which means that + Item::handle_prebroken_dependencies should only be called + AFTER this list is composed. The list composition function + should probably not check for suicided items or NULL pointers + but leave that to the various methods that use it. + */ + if (Item *it = dynamic_cast (elts[i])) { - relevant_grobs.push_back (elts[i]); - if (Item *it = dynamic_cast (elts[i])) + for (LEFT_and_RIGHT (d)) { - for (LEFT_and_RIGHT (d)) - { - Item *piece = it->find_prebroken_piece (d); - if (piece && piece->is_live ()) - relevant_grobs.push_back (piece); - } + Item *piece = it->find_prebroken_piece (d); + if (piece && piece->is_live ()) + relevant_grobs.push_back (piece); } } } @@ -672,8 +682,8 @@ avoid_outside_staff_collisions (Grob *elt, for (vsize j = 0; j < other_v_skylines.size (); j++) { Skyline_pair const &v_other = other_v_skylines[j]; - Real pad = (padding + other_padding[j]); - Real horizon_pad = (horizon_padding + other_horizon_padding[j]); + Real pad = max (padding, other_padding[j]); + Real horizon_pad = max (horizon_padding, other_horizon_padding[j]); // We need to push elt up by at least this much to be above v_other. Real up = (*v_skyline)[DOWN].distance (v_other[UP], horizon_pad) + pad; @@ -762,7 +772,9 @@ add_grobs_of_one_priority (Grob *me, { Grob *elt = elements[i]; Real padding - = robust_scm2double (elt->get_property ("outside-staff-padding"), 0.25); + = robust_scm2double (elt->get_property ("outside-staff-padding"), + Axis_group_interface + ::get_default_outside_staff_padding ()); Real horizon_padding = robust_scm2double (elt->get_property ("outside-staff-horizontal-padding"), 0.0); Interval x_extent = elt->extent (x_common, X_AXIS); @@ -1034,7 +1046,6 @@ ADD_INTERFACE (Axis_group_interface, "nonstaff-nonstaff-spacing " "nonstaff-relatedstaff-spacing " "nonstaff-unrelatedstaff-spacing " - "outside-staff-placement-directive " "pure-relevant-grobs " "pure-relevant-items " "pure-relevant-spanners " @@ -1043,7 +1054,6 @@ ADD_INTERFACE (Axis_group_interface, "staff-grouper " "staff-staff-spacing " "system-Y-offset " - "vertical-skyline-elements " "X-common " "Y-common " );