]> git.donarmstrong.com Git - lilypond.git/commitdiff
Removes duplicate footnote-interface implementing grobs from all_elements_
authorMike Solomon <mike@apollinemike.com>
Fri, 15 Jun 2012 06:34:33 +0000 (08:34 +0200)
committerMike Solomon <mike@apollinemike.com>
Fri, 15 Jun 2012 06:34:33 +0000 (08:34 +0200)
input/regression/footnote-break-visibility.ly
lily/system.cc

index 0f88e2df276599a66ff346c58cdd521e31e1dec6..4626553982a90a4808ac1b7807ae09fb0c9525e3 100644 (file)
@@ -18,7 +18,7 @@ This behavior can be overridden.
     \time 3/4
     \break \pageBreak
     c2.
-    \once \override Staff . FootnoteItem #'break-visibility = ##(#f #f #t)
+    \once \override Score . FootnoteItem #'break-visibility = ##(#f #f #t)
     \footnote "foo" #'(0 . 2) #'TimeSignature "bar" \default
     \time 4/4
     \break \pageBreak
index fdcc2b133d1b056f78482087218aac7abbc559ff..be3c9ec1921ac34a571911de5e7705b87ef31c3f 100644 (file)
@@ -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);
     }