(c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "key-item.hh"
+
#include "command-request.hh"
#include "musical-request.hh"
#include "item.hh"
-#include "bar.hh"
+#include "bar-line.hh"
#include "staff-symbol-referencer.hh"
#include "translator-group.hh"
#include "engraver.hh"
virtual bool try_music (Music *req_l);
virtual void stop_translation_timestep ();
virtual void start_translation_timestep ();
- virtual void create_grobs ();
+ virtual void process_music ();
virtual void acknowledge_grob (Grob_info);
};
item_p_->set_grob_property ("old-accidentals", get_property ("lastKeySignature"));
item_p_->set_grob_property ("new-accidentals", get_property ("keySignature"));
- Staff_symbol_referencer::set_interface (item_p_);
- Key_item::set_interface (item_p_);
-
-
announce_grob(item_p_, keyreq_l_ ? keyreq_l_->self_scm() : SCM_EOL);
}
{
SCM vis = get_property ("explicitKeySignatureVisibility");
if (gh_procedure_p (vis))
- item_p_->set_grob_property ("visibility-lambda",vis);
+ item_p_->set_grob_property ("break-visibility",vis);
}
}
keyreq_l_->origin ()->warning (_ ("This was the other key definition."));
return false;
}
- keyreq_l_ = kc;
- read_req (keyreq_l_);
+ if (!keyreq_l_)
+ {
+ /*
+ do this only once, just to be on the safe side.
+ */
+ keyreq_l_ = kc;
+ read_req (keyreq_l_);
+ }
+
return true;
}
return false;
create_key (false);
}
}
- else if (Bar::has_interface (info.grob_l_)
+ else if (Bar_line::has_interface (info.grob_l_)
&& gh_pair_p (get_property ("keySignature")))
{
create_key (true);
void
-Key_engraver::create_grobs ()
+Key_engraver::process_music ()
{
if (keyreq_l_ ||
get_property ("lastKeySignature") != get_property ("keySignature"))
if (gh_scm2int (ly_cdar (s)))
accs = gh_cons (ly_car (s), accs);
+#if 0
daddy_trans_l_->set_property ("lastKeySignature",
get_property ("keySignature"));
+#endif
+
daddy_trans_l_->set_property ("keySignature", accs);
}