2004-03-31 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/chord-tremolo-engraver.cc (acknowledge_grob): trigger
+ stem-tremolo by stem object. This fixes no stem for tremolo bug.
+
* lily/stem-tremolo.cc (print): don't crash for no-stem.
* Documentation/user/changing-defaults.itely (Which properties to
void
Chord_tremolo_engraver::process_music ()
{
- if (repeat_)
- {
- if (sequential_body_b_ && !beam_)
+ if (repeat_ && sequential_body_b_ && !beam_)
{
beam_ = make_spanner ("Beam");
beam_->set_property ("chord-tremolo", SCM_BOOL_T);
beam_start_location_ = mp;
announce_grob (beam_, repeat_->self_scm ());
}
- else if (!sequential_body_b_ && !stem_tremolo_)
- {
- if (flags_)
- {
- stem_tremolo_ = make_item ("StemTremolo");
- announce_grob (stem_tremolo_, repeat_->self_scm ());
- stem_tremolo_->set_property ("flag-count",
- scm_int2num (flags_));
- }
- }
- }
}
+
void
Chord_tremolo_engraver::finalize ()
{
::warning (s);
}
}
- else if (stem_tremolo_ && Stem::has_interface (info.grob_))
+ else if (repeat_ &&
+ flags_ && !sequential_body_b_ && Stem::has_interface (info.grob_))
{
- Stem_tremolo::set_stem (stem_tremolo_, info.grob_);
- stem_tremolo_->set_parent (info.grob_,X_AXIS);
+ stem_tremolo_ = make_item ("StemTremolo");
+ announce_grob (stem_tremolo_, repeat_->self_scm ());
+ stem_tremolo_->set_property ("flag-count",
+ scm_int2num (flags_));
+ stem_tremolo_->set_property ("stem",
+ info.grob_->self_scm ());
+ stem_tremolo_->set_parent (info.grob_, X_AXIS);
}
}
DECLARE_SCHEME_CALLBACK (dim_callback, (SCM smob, SCM axis));
DECLARE_SCHEME_CALLBACK (print, (SCM ));
DECLARE_SCHEME_CALLBACK (height, (SCM,SCM));
- static void set_stem (Grob*me, Grob *st);
static Stencil raw_stencil (Grob*);
};
gh_int2scm (tremolo_flags));
tremolo_->set_parent (stem_, X_AXIS);
stem_->set_property ("tremolo-flag", tremolo_->self_scm ());
+ tremolo_->set_property ("stem",
+ stem_->self_scm ());
}
}
{
if (tremolo_)
{
- Stem_tremolo::set_stem (tremolo_, stem_);
typeset_grob (tremolo_);
tremolo_ = 0;
}
}
-void
-Stem_tremolo::set_stem (Grob*me,Grob *s)
-{
- me->set_property ("stem", s->self_scm ());
-}
-
ADD_INTERFACE (Stem_tremolo,"stem-tremolo-interface",
"A beam slashing a stem to indicate a tremolo.",