source file of the GNU LilyPond music typesetter
- (c) 1998--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1998--2004 Jan Nieuwenhuizen <janneke@gnu.org>
Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
void
Hara_kiri_group_spanner::consider_suicide (Grob*me)
{
+ Spanner*sp = dynamic_cast<Spanner*> (me);
SCM worth = me->get_grob_property ("items-worth-living");
if (gh_pair_p (worth))
return ;
+ if (!to_boolean (me->get_grob_property ("remove-first"))
+ && broken_spanner_index (sp) == 0)
+ {
+ return ;
+ }
+
Link_array<Grob> childs = Axis_group_interface::get_children (me);
for (int i = 0; i < childs.size (); i++)
childs[i]->suicide ();
ADD_INTERFACE (Hara_kiri_group_spanner,"hara-kiri-group-interface",
- " As Vertical_group_spanner, but keep track of interesting items. If
-we don't contain any interesting items after linebreaking, then
-gracefully commit suicide. Objective: don't disgrace Lily by
-typesetting empty lines in orchestral scores.",
- "items-worth-living");
+ " As Vertical_group_spanner, but keep track of interesting items. If \
+we don't contain any interesting items after linebreaking, then \
+gracefully commit suicide. Objective: don't disgrace Lily by \
+typesetting empty lines in orchestral scores.", \
+ "items-worth-living remove-first");