X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fthread-devnull-engraver.cc;h=9e995b2f741183c2c7a23dfc16c7a0e218d7763b;hb=6eb2e2f71f9895b58a01693a94ea84a432bb3766;hp=6436f0c2efd5c39203f33153ea57e79eb2b5a0b0;hpb=49e78b19bad368750d257062d12b17ad65d83db4;p=lilypond.git diff --git a/lily/thread-devnull-engraver.cc b/lily/thread-devnull-engraver.cc index 6436f0c2ef..9e995b2f74 100644 --- a/lily/thread-devnull-engraver.cc +++ b/lily/thread-devnull-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2000 Jan Nieuwenhuizen + (c) 2000--2001 Jan Nieuwenhuizen */ #include "engraver.hh" @@ -17,17 +17,29 @@ public: VIRTUAL_COPY_CONS (Translator); protected: - virtual void acknowledge_element (Score_element_info); + virtual void acknowledge_grob (Grob_info); }; ADD_THIS_TRANSLATOR (Thread_devnull_engraver); void -Thread_devnull_engraver::acknowledge_element (Score_element_info i) +Thread_devnull_engraver::acknowledge_grob (Grob_info i) { - if (daddy_trans_l_->id_str_ == "two" - && (to_boolean (get_property ("unison")) - || to_boolean (get_property ("unisilence"))) - && to_boolean (get_property ("soloADue"))) - i.elem_l_->suicide (); + SCM s = get_property ("devNullThread"); +#if 0 + /* No need, next if will never be true */ + if (s == ly_symbol2scm ("never")) + return; +#endif + + if (s == ly_symbol2scm ("allways") + || (s == SCM_EOL + && daddy_trans_l_->id_str_.left_str (3) == "two" + && (to_boolean (get_property ("unison")) + || to_boolean (get_property ("unisilence"))) + && to_boolean (get_property ("soloADue")))) + { + /* Ugh, we can suicide them, but they remain living */ + i.elem_l_->suicide (); + } }