]> git.donarmstrong.com Git - lilypond.git/commit
Issue 4005: Set X-parent of TextScript to NoteColumn instead of PaperColumn
authorJanek Warchoł <lemniskata.bernoullego@gmail.com>
Sun, 29 Jun 2014 16:25:04 +0000 (18:25 +0200)
committerJanek Warchoł <lemniskata.bernoullego@gmail.com>
Sat, 26 Jul 2014 06:45:10 +0000 (08:45 +0200)
commit2371d6ba3b62d4d6dc349ab50fa0d76eadfba044
tree3a3c851059e399820707358ce644d49eaa1aa1e0
parent8ffecf6be17c6ec2ff87cf31873121a8cce29b09
Issue 4005: Set X-parent of TextScript to NoteColumn instead of PaperColumn

This makes TextScripts consistent with DynamicTexts and LyricTexts.
This is a follow-up to commit 59a842eba0f7ad78289a58a (Issue 2245).

Setting TextScript.cross-staff property to #f is required to ensure
that there are no collisions between TextScripts and cross-staff notes:

\context PianoStaff <<
  \new Staff = "up" {
    b8[
    \change Staff="down"
    d'] ^"text"
  }
  \new Staff = "down" {
    \clef bass
    s4
  }
>>

(see also beam-cross-staff-auto-knee.ly)

As far as I can see, we don't want TextScript.cross-staff to be true
in any situation, because it would result in unwanted collisions.

Why it worked before: cross-staff property in this example evaluated to #f,
but only because of a bug in Script_interface::calc_cross_staff.  That
function should have marked the TextScript as cross-staff if the stem
of the note to which TextScript was attached was cross-staff, but it
didn't work correctly because it expected the parent of the TextScript
to be a NoteColumn, while it actually was a PaperColumn.  When I changed
the parent to be a NoteColumn, the function started working correctly
and marked the TextScript as cross-staff, so I had to change the default
value of the property.
lily/text-engraver.cc
scm/define-grobs.scm