+ if (p->item_)
+ p->bracket_->set_object ("pedal-text", p->item_->self_scm ());
+ }
+
+ /*
+ We do not use currentMusicalColumn for the left span-point.
+ If the column as accidentals (eg on a different stave), the
+ currentMusicalColumn is too wide, making the bracket too big.
+
+ TODO:
+
+ Hmm. What do we do when there are no notes when the spanner starts?
+
+ TODO:
+
+ what about the right span point?
+
+ */
+ Axis_group_interface::add_element (p->line_spanner_, p->bracket_);
+
+ if (!p->event_drul_[STOP])
+ {
+
+ /*
+ code dup. --hwn.
+
+ // position new pedal spanner below the current one
+ */
+ if (previous_.size ())
+ Side_position_interface::add_support (p->line_spanner_, previous_.back ());
+
+ previous_.push_back (p->line_spanner_);
+ }
+ }
+
+ p->event_drul_[START] = 0;
+ p->event_drul_[STOP] = 0;
+}
+
+void
+Piano_pedal_engraver::finalize ()
+{
+ for (Pedal_info *p = info_list_; p && p->name_; p++)
+ {
+ /*
+ suicide?
+ */
+ if (p->line_spanner_
+ && !p->line_spanner_->is_live ())
+ p->line_spanner_ = 0;
+
+ if (p->bracket_
+ && !p->bracket_->is_live ())
+ p->bracket_ = 0;
+
+ if (p->bracket_)
+ {
+ SCM cc = get_property ("currentCommandColumn");
+ Item *c = unsmob_item (cc);
+ if (p->line_spanner_)
+ p->line_spanner_->set_bound (RIGHT, c);
+ p->bracket_->set_bound (RIGHT, c);
+
+ p->finished_bracket_ = p->bracket_;
+ p->bracket_ = 0;
+ p->finished_line_spanner_ = p->line_spanner_;
+ p->line_spanner_ = 0;
+ typeset_all (p);
+ }
+
+ if (p->line_spanner_)
+ {
+ p->finished_line_spanner_ = p->line_spanner_;
+ typeset_all (p);
+ }
+ }
+}
+
+void
+Piano_pedal_engraver::del_linespanner (Spanner *g)
+{
+ vsize idx = find (previous_, g) - previous_.begin ();
+ if (idx != VPOS && idx < previous_.size ())
+ previous_.erase (previous_.begin () + idx);
+}
+
+void
+Piano_pedal_engraver::stop_translation_timestep ()
+{
+ for (Pedal_info *p = info_list_; p && p->name_; p++)
+ {
+ if (!p->bracket_)
+ {
+ p->finished_line_spanner_ = p->line_spanner_;
+ p->line_spanner_ = 0;
+ del_linespanner (p->finished_line_spanner_);