]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3631: 2.17 does a worse job with vertical spacing and/or the page layout than...
authorMike Solomon <mike@mikesolomon.org>
Sat, 2 Nov 2013 15:35:44 +0000 (16:35 +0100)
committerDavid Kastrup <dak@gnu.org>
Sat, 2 Nov 2013 15:35:44 +0000 (16:35 +0100)
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.

lily/axis-group-interface.cc

index d4d3d4102210a5896ddcd09886186beda7465294..1e945f2f9ec8e58f768dc0ae50932e4f450b70e3 100644 (file)
@@ -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<Item *> (elts[i]))
         {
-          relevant_grobs.push_back (elts[i]);
-          if (Item *it = dynamic_cast<Item *> (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);
             }
         }
     }