don't access StaffSymbol if not there.
* lily/instrument-name-engraver.cc (class
Instrument_name_engraver): data member first_. Create
InstrumentName on start.
+2005-05-12 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/slur-scoring.cc (move_away_from_staffline): robustness,
+ don't access StaffSymbol if not there.
+
+ * lily/instrument-name-engraver.cc (class
+ Instrument_name_engraver): data member first_. Create
+ InstrumentName on start.
+
2005-05-12 Graham Percival <gperlist@shaw.ca>
* Documentation/user/instrument-notation.itely: add guitar
SPONSORS
Bertalan Fodor
+Chris Sawer
Gunther Strube
Hans Forbrich
Jonathan Walther
class Instrument_name_engraver : public Engraver
{
-
+ bool first_;
public:
TRANSLATOR_DECLARATIONS (Instrument_name_engraver);
virtual void acknowledge_grob (Grob_info);
virtual void stop_translation_timestep ();
virtual void process_music ();
+
};
Instrument_name_engraver::Instrument_name_engraver ()
{
text_ = 0;
+ first_ = true;
}
void
get_property ("instrumentSupport"));
text_ = 0;
}
+
+ first_ = false;
}
void
Also create text if barlines in other groups. This allows
a name to be attached to lyrics or chords.
*/
- if (scm_is_string (get_property ("whichBar")))
+ if (scm_is_string (get_property ("whichBar"))
+ || first_)
create_text ();
}
Slur_score_state::move_away_from_staffline (Real y,
Grob *on_staff) const
{
+ Grob * staff_symbol = Staff_symbol_referencer::get_staff_symbol (on_staff);
+ if (!staff_symbol)
+ return y;
+
Real pos
- = (y - Staff_symbol_referencer::get_staff_symbol (on_staff)->relative_coordinate (common_[Y_AXIS],
+ = (y - staff_symbol->relative_coordinate (common_[Y_AXIS],
Y_AXIS))
* 2.0 / staff_space_;