/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1996--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1996--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
c[j]->translate_axis (breaking[i].config_[j], X_AXIS);
dynamic_cast<Paper_column *> (c[j])->set_system (system);
/* collect the column labels */
- SCM col_labels = c[j]->get_property ("labels");
- if (scm_is_pair (col_labels))
- system_labels = scm_append (scm_list_2 (col_labels, system_labels));
+ collect_labels (c[j], &system_labels);
}
+ /*
+ Collect labels from any loose columns too: theses will be set on
+ an empty bar line or a column which is otherwise unused mid-line
+ */
+ vector<Grob *> loose (breaking[i].loose_cols_);
+ for (vsize j = 0; j < loose.size (); j++)
+ collect_labels (loose[j], &system_labels);
+
system->set_property ("labels", system_labels);
set_loose_columns (system, &breaking[i]);
}
}
+void
+System::collect_labels (Grob const *col, SCM *labels)
+{
+ SCM col_labels = col->get_property ("labels");
+ if (scm_is_pair (col_labels))
+ *labels = scm_append (scm_list_2 (col_labels, *labels));
+}
+
void
System::add_column (Paper_column *p)
{