X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finstrument-switch-engraver.cc;h=589bb051452acf1aef8da687e45fd0902525de66;hb=0a0da41d935f7744e7ffd934034f25c40d4c59be;hp=91072976771a04263005314e29bdd6ca636aec2c;hpb=2909349bdbefbf880fa9c8c47ba2eddf9f9855ca;p=lilypond.git diff --git a/lily/instrument-switch-engraver.cc b/lily/instrument-switch-engraver.cc index 9107297677..589bb05145 100644 --- a/lily/instrument-switch-engraver.cc +++ b/lily/instrument-switch-engraver.cc @@ -1,14 +1,26 @@ /* - 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--2009 Han-Wen Nienhuys - (c) 2006--2007 Han-Wen Nienhuys + 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 . */ #include "engraver.hh" #include "item.hh" +#include "text-interface.hh" #include "translator.icc" @@ -41,8 +53,11 @@ Instrument_switch_engraver::process_music () if (!scm_is_eq (cue_name_, cue_text)) { - text_ = make_item ("InstrumentSwitch", SCM_EOL); - text_->set_property ("text", cue_text); + if (Text_interface::is_markup (cue_text)) + { + text_ = make_item ("InstrumentSwitch", SCM_EOL); + text_->set_property ("text", cue_text); + } cue_name_ = cue_text; } }