]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/instrument-switch-engraver.cc
Fix min_page_count in page-turn-breaking.
[lilypond.git] / lily / instrument-switch-engraver.cc
index 9ca24bc95c0b866d9480844761a5090e62ee60d7..8bd364646c58af80b5089ef388f34b70f9c00f56 100644 (file)
@@ -1,15 +1,27 @@
 /*
-  instrument-switch-engraver.cc -- implement
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the GNU LilyPond music typesetter
+  Copyright (C) 2006--2010 Han-Wen Nienhuys <hanwen@lilypond.org>
 
-  (c) 2006--2009 Han-Wen Nienhuys <hanwen@lilypond.org>
 
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "engraver.hh"
 #include "item.hh"
 #include "text-interface.hh"
+
 #include "translator.icc"
 
 
@@ -23,8 +35,15 @@ protected:
 
   void stop_translation_time_step ();
   void process_music ();
+
+  virtual void derived_mark () const;
 };
 
+void
+Instrument_switch_engraver::derived_mark () const
+{
+  scm_gc_mark (cue_name_);
+}
 
 Instrument_switch_engraver::Instrument_switch_engraver ()
 {
@@ -39,11 +58,10 @@ void
 Instrument_switch_engraver::process_music ()
 {
   SCM cue_text = get_property ("instrumentCueName");
-  
+
   if (!scm_is_eq (cue_name_, cue_text))
     {
       if (Text_interface::is_markup (cue_text))
-//       if (!scm_is_null (cue_text))
         {
           text_ = make_item ("InstrumentSwitch", SCM_EOL);
           text_->set_property ("text", cue_text);