source file of the GNU LilyPond music typesetter
- (c) 1998--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
Spanner * sep_span_;
virtual void acknowledge_grob (Grob_info);
- virtual void initialize ();
+ virtual void process_music ();
virtual void finalize ();
virtual void stop_translation_timestep ();
virtual void start_translation_timestep ();
}
void
-Separating_line_group_engraver::initialize ()
+Separating_line_group_engraver::process_music ()
{
- sep_span_ = new Spanner (get_property ("SeparatingGroupSpanner"));
- announce_grob(sep_span_, SCM_EOL);
- sep_span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
-}
+ if (!sep_span_)
+ {
+ sep_span_ = make_spanner ("SeparatingGroupSpanner");
+ announce_grob(sep_span_, SCM_EOL);
+ sep_span_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn")));
+ }
+}
void
Separating_line_group_engraver::finalize ()
{
+ if (!sep_span_)
+ return ;
+
SCM ccol = get_property ("currentCommandColumn");
Grob *column = unsmob_grob (ccol);
if (!p_ref_)
{
- p_ref_ = new Item (get_property ("SeparationItem"));
+ p_ref_ = make_item ("SeparationItem");
if (ib)
{
if (p_ref_ == break_item_)
{
- Item *it = new Item (get_property ("StaffSpacing"));
+ Item *it = make_item ("StaffSpacing");
current_spacings_.staff_spacing_ = it;
it->set_grob_property ("left-items", gh_cons (break_item_->self_scm (), SCM_EOL));