diff options
author | Reinhold Kainhofer <reinhold@kainhofer.com> | 2011-06-24 22:43:55 +0200 |
---|---|---|
committer | Reinhold Kainhofer <reinhold@kainhofer.com> | 2011-07-28 13:52:17 +0200 |
commit | cf3642858a2340bb39ee56739f34c799946d4454 (patch) | |
tree | 98976b04d5910dd7dacbcc83e8a5ff700f10345e /lily/spanner.cc | |
parent | 72210831b0366cb7c1f7009ba99a56538d68a7e5 (diff) |
Fix 1259/1433: linebreaks with \breakDynamicSpan or spanners with style=#'none
This patch changes the way DynamicLineSpanners are handled when
\breakDynamicSpan is called or when the DynamicTextSpanner's style=#'none
(i.e. no line should be used and thus the spanner should also not
unneccessarily shift the dynamic text spanner up/down).
So far, this was handled by simply ending the DynamicLineSpanner prematurely,
while leaving its children at their full length. As a consequence, the child
spanners were no longer fully contained in the DynamicLineSpanner, which
caused several problem at line breaks.
This patch changes it as follows:
-) All spanner breaks are handled by a flag set on the spanner itself
-) The breakDynamicSpan events are handled by the dynamic engraver, which will
set that flag (no longer handled by the dynamic span engraver!).
This allows to obey the order of \breakDynamicSpan and \> (i.e. if the
break was before the \< then break the previous spanner, if it was placed
afterwards then end the newly created spanner)
-) When a DynamicTextSpanner with style=#'none or a \breakDynamicSpan
is encountered, I also set that flag immediately after spanner creation
-) From then on, no new dynamics are added to the line spanner and no
new support points are added that would otherwise shift the spanner
if there is a very high/low note or articulation. If the spanner creates
a grob (like a hairpin), that grob would still be shifted as a grob
to prevent collisions, though.
-) When the current child spanner is ended, we also end the DynamicLineSpanner
(and store it in a temporary variable so that we can properly end it
in stop_translation_timestep). If a new dynamic is encountered, it will
then create a completely new DynamicLineSpanner, which provides the
independent alignment that we want.
This fixes both issues 1259 and 1433.
Diffstat (limited to 'lily/spanner.cc')
-rw-r--r-- | lily/spanner.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lily/spanner.cc b/lily/spanner.cc index 22282aa231..18a7e645f5 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -547,6 +547,7 @@ ADD_INTERFACE (Spanner, /* properties */ "normalized-endpoints " "minimum-length " + "spanner-broken " "spanner-id " "to-barline " ); |