+
+ if ((Text_interface::is_markup (long_text)
+ || Text_interface::is_markup (short_text))
+ && (!text_spanner_
+ || !scm_is_eq (short_text_, short_text)
+ || !scm_is_eq (long_text_, long_text)))
+ {
+ if (text_spanner_)
+ stop_spanner ();
+
+ short_text_ = short_text;
+ long_text_ = long_text;
+
+ start_spanner ();
+ }
+}
+
+void
+Instrument_name_engraver::start_spanner ()
+{
+ text_spanner_ = make_spanner ("InstrumentName", SCM_EOL);
+
+ Grob *col = unsmob<Grob> (get_property ("currentCommandColumn"));
+ text_spanner_->set_bound (LEFT, col);
+ text_spanner_->set_property ("text", short_text_);
+ text_spanner_->set_property ("long-text", long_text_);
+
+ /*
+ UGH, should handle this in Score_engraver.
+ */
+ Grob *system = unsmob<Grob> (get_property ("rootSystem"));
+ if (system)
+ Axis_group_interface::add_element (system, text_spanner_);
+ else
+ text_spanner_->programming_error ("cannot find root system");