]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/slur-scoring.cc (move_away_from_staffline): robustness,
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 12 May 2005 09:30:49 +0000 (09:30 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 12 May 2005 09:30:49 +0000 (09:30 +0000)
don't access StaffSymbol if not there.

* lily/instrument-name-engraver.cc (class
Instrument_name_engraver): data member first_. Create
InstrumentName on start.

ChangeLog
THANKS
lily/instrument-name-engraver.cc
lily/slur-scoring.cc

index eb70211222808bbab373a4dd51d2bf9aa573c0bf..59d1fab6d89f2d21c7492d34fe77ef3b67e0a484 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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
diff --git a/THANKS b/THANKS
index f2bc6c3dc28dfd2298cb0a50da4b9e452a4ba22d..2e7e12ca56f27a0438f890231b89dcf75b05e607 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -45,6 +45,7 @@ Tineke de Munnik
 SPONSORS
 
 Bertalan Fodor
+Chris Sawer
 Gunther Strube
 Hans Forbrich
 Jonathan Walther
index 34fcca0c2268c419aef40c123e799716e24119c4..e5ac0fe8fe91921e4a3dcf40257e15c1e3b1fdeb 100644 (file)
@@ -17,7 +17,7 @@
 
 class Instrument_name_engraver : public Engraver
 {
-
+  bool first_; 
 public:
   TRANSLATOR_DECLARATIONS (Instrument_name_engraver);
 
@@ -29,11 +29,13 @@ protected:
   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
@@ -51,6 +53,8 @@ Instrument_name_engraver::stop_translation_timestep ()
                           get_property ("instrumentSupport"));
       text_ = 0;
     }
+  
+  first_ = false;
 }
 
 void
@@ -119,7 +123,8 @@ Instrument_name_engraver::process_music ()
     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 ();
 }
 
index 9b005386c4153c8ffcdf2338988d913bd9b2377b..22248890e83e801f2f1ae6e054455f26104721f4 100644 (file)
@@ -598,8 +598,12 @@ Real
 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_;