]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/system.cc
Properly implement fromproperty markup handing in the pdftitle header field
[lilypond.git] / lily / system.cc
index bc59dede88787e7d9e517d80473ae66c7164cd79..be3c9ec1921ac34a571911de5e7705b87ef31c3f 100644 (file)
@@ -206,7 +206,7 @@ System::get_broken_system_grobs ()
   SCM ret = SCM_EOL;
   for (vsize i = 0; i < broken_intos_.size (); i++)
     ret = scm_cons (broken_intos_[i]->self_scm (), ret);
-  return scm_reverse (ret);
+  return scm_reverse_x (ret, SCM_EOL);
 }
 
 SCM
@@ -254,6 +254,12 @@ System::get_footnote_grobs_in_range (vsize start, vsize end)
 
       if (Item *item = dynamic_cast<Item *>(at_bat))
         {
+          /*
+            We use this to weed out grobs that fall at the end
+            of the line when we want grobs at the beginning.
+          */
+          end_of_line_visible = item->break_status_dir () == LEFT;
+
           if (!Item::break_visible (item))
             continue;
           // safeguard to bring down the column rank so that end of line footnotes show up on the correct line
@@ -275,6 +281,14 @@ System::get_footnote_grobs_in_range (vsize start, vsize end)
         continue;
       if (!at_bat->is_live ())
         continue;
+      /*
+        TODO
+        Sometimes, there are duplicate entries in the all_elements_
+        list. In a separate patch, this practice should be squashed
+        so that the check below can be eliminated.
+      */
+      if (find (out.begin (), out.end (), at_bat) != out.end ())
+        continue;
 
       out.push_back (at_bat);
     }
@@ -874,14 +888,12 @@ System::calc_pure_relevant_grobs (SCM smob)
 
           if (Item *it = dynamic_cast<Item *> (elts[i]))
             {
-              Direction d = LEFT;
-              do
+              for (LEFT_and_RIGHT (d))
                 {
                   Item *piece = it->find_prebroken_piece (d);
                   if (piece && to_boolean (scm_apply_1 (pure_relevant_p, piece->self_scm (), SCM_EOL)))
                     relevant_grobs.push_back (piece);
                 }
-              while (flip (&d) != LEFT);
             }
         }
     }