diff options
author | Mike Solomon <mike@apollinemike.com> | 2013-04-18 06:19:50 +0200 |
---|---|---|
committer | Mike Solomon <mike@apollinemike.com> | 2013-04-18 06:19:50 +0200 |
commit | 5ab8335d106d736335698245af3c1b2b2455aed6 (patch) | |
tree | c9a82af35ba0b59017fc917fe52165f66aee0777 /lily/paper-column-engraver.cc | |
parent | 54d23d6ca9b231155f5d171b6c0e86edf489c36b (diff) |
Adds arpeggio to conditional item grob array.
The actual function of conditional elements was not correctly reflected
in the comment above Separation_item::boxes. This comment led one to believe
that conditional elements were only used when notes with accidentals
had ties coming to them. This is not true. Conditional elements are always
used for right columns when there is something to the left (see
Spacing_interface::skylines). They are omitted _only_ when they are
accidentals with ties coming to them.
So why do we want an arpeggio to be a conditional element? There is
nothing conditional about it (it will always be printed, unlike accidentals
with ties going to them). It is because conditional elements have the
double duty of being conditional (i.e. accidentals) AND being factored
into springs in note spacing (see the long comment in
Note_spacing::get_spacing) in the calculation of a spring's ideal distance.
Other elements to the left of a note column, like scripts and fingerings,
are only factored into the minimum distance. We want arpeggios to factor
into the ideal distance because otherwise they will be too close to
left note-columns in tight spacing situations.
Lastly, there was no reason in the code base to keep a pointer to the
arpeggio in the note column, so it is removed here.
Diffstat (limited to 'lily/paper-column-engraver.cc')
-rw-r--r-- | lily/paper-column-engraver.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lily/paper-column-engraver.cc b/lily/paper-column-engraver.cc index 8ff894d8fa..cdbb2e8b00 100644 --- a/lily/paper-column-engraver.cc +++ b/lily/paper-column-engraver.cc @@ -22,6 +22,7 @@ #include "international.hh" #include "accidental-placement.hh" #include "accidental-interface.hh" +#include "arpeggio.hh" #include "axis-group-interface.hh" #include "context.hh" #include "note-spacing.hh" @@ -241,7 +242,8 @@ Paper_column_engraver::stop_translation_timestep () if (!unsmob_grob (elem->get_object ("axis-group-parent-X"))) elem->set_object ("axis-group-parent-X", col->self_scm ()); - if (Accidental_placement::has_interface (elem)) + if (Accidental_placement::has_interface (elem) + || Arpeggio::has_interface (elem)) Separation_item::add_conditional_item (col, elem); else if (!Accidental_interface::has_interface (elem)) Separation_item::add_item (col, elem); |