From: Mike Solomon Date: Sat, 2 Nov 2013 15:35:44 +0000 (+0100) Subject: Issue 3631: 2.17 does a worse job with vertical spacing and/or the page layout than... X-Git-Tag: release/2.17.95-1~4^2~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=bbce29ac86183fafea385e3c545a4091652bcaae;p=lilypond.git Issue 3631: 2.17 does a worse job with vertical spacing and/or the page layout than 2.16 Looks for prebroken pieces of dead items in the pure relevant function. Even if the item is dead, its prebroken pieces may not be. We need to check them and build them into the pure skylines of axis groups used by the align interface. --- diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index d4d3d41022..1e945f2f9e 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -494,16 +494,26 @@ Axis_group_interface::internal_calc_pure_relevant_grobs (Grob *me, const string 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); } } }