Reviewers: ,

Message:
This fixes Issue 2574 but also deals with the footnote-break-visibility
regtest, which currently does not register the property change (this may
have something to do with the footnote engraver being on the Score
level).

Cheers,
MS

Description:
Footnotes correctly printed on grobs at first timestep.

Please review this at http://codereview.appspot.com/6306064/

Affected files:
  M input/regression/footnote-break-visibility.ly
  M lily/system.cc


Index: input/regression/footnote-break-visibility.ly
diff --git a/input/regression/footnote-break-visibility.ly b/input/regression/footnote-break-visibility.ly index 0f88e2df276599a66ff346c58cdd521e31e1dec6..4626553982a90a4808ac1b7807ae09fb0c9525e3 100644
--- a/input/regression/footnote-break-visibility.ly
+++ b/input/regression/footnote-break-visibility.ly
@@ -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: lily/system.cc
diff --git a/lily/system.cc b/lily/system.cc
index fdcc2b133d1b056f78482087218aac7abbc559ff..5d4cae8a57b8f86333bc49da7e267d2f7e8a81b6 100644
--- a/lily/system.cc
+++ b/lily/system.cc
@@ -254,6 +254,8 @@ System::get_footnote_grobs_in_range (vsize start, vsize end)

       if (Item *item = dynamic_cast<Item *>(at_bat))
         {
+          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 +277,8 @@ System::get_footnote_grobs_in_range (vsize start, vsize end)
         continue;
       if (!at_bat->is_live ())
         continue;
+      if (find (out.begin (), out.end (), at_bat) != out.end ())
+        continue;

       out.push_back (at_bat);
     }



_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to