]> git.donarmstrong.com Git - lilypond.git/commit
Don't report a programming error when aligned grob has empty extent.
authorJanek Warchoł <lemniskata.bernoullego@gmail.com>
Sun, 24 Mar 2013 10:43:52 +0000 (11:43 +0100)
committerJanek Warchoł <lemniskata.bernoullego@gmail.com>
Tue, 26 Mar 2013 21:47:09 +0000 (22:47 +0100)
commit1656075e24330067ff1dfa4d8253e5f3e5783014
tree9fd41c2f62960e1876ea19c9dc657525cb6565dc
parentbd26755d6208ce93e12d701e9f0b4ac72180bacd
Don't report a programming error when aligned grob has empty extent.

(Issue 3259)

If a grob's extent is empty (undefined), alignment procedures from
Self_alignment_interface don't have any information about grob's
dimensions, so they cannot calculate the offset required to achieve
specified alignment of such grob.

However, this isn't actually a problem: if a grob's extent is empty,
this usually means that the grob itself is empty, and in that case
there is nothing to align at all.  Therefore, no programming error
should be reported.

For example, a user may remove some grob from output by overriding
its stencil to #f.  This will result in an empty extent, and Lily
shouldn't complain about being unable to align such grob, because
there is nothing to align.

Nevertheless, if the extent is empty but the stencil itself isn't
empty, the situation looks suspicious, so we issue a warning.
lily/self-alignment-interface.cc