/*
TODO: probably broken.
*/
- script_ev_ = ev;
+ ASSIGN_EVENT_ONCE (script_ev_, ev);
}
IMPLEMENT_TRANSLATOR_LISTENER (Dynamic_engraver, span_dynamic);
{
Direction d = to_dir (ev->get_property ("span-direction"));
- accepted_spanevents_drul_[d] = ev;
- if (current_cresc_ev_ && d == START)
- accepted_spanevents_drul_[STOP] = ev;
+ if (d == START)
+ ASSIGN_EVENT_ONCE (accepted_spanevents_drul_[START], ev);
+
+ /* Cancel any ongoing crescendo, either explicitly by \! or
+ implicitly by a new crescendo. Also avoid warning if cresc is
+ cancelled both implicitly and explicitly. */
+ if ((d == STOP || current_cresc_ev_) && !accepted_spanevents_drul_[STOP])
+ ASSIGN_EVENT_ONCE (accepted_spanevents_drul_[STOP], ev);
}
void
ly_symbol2scm ("adjacent-hairpins"),
finished_cresc_);
}
- cresc_->set_property ("grow-direction",
- scm_from_int ((start_type == "crescendo")
- ? BIGGER : SMALLER));
}
/*
"which takes care of vertical positioning. ",
/* create */ "DynamicLineSpanner DynamicText Hairpin TextSpanner",
- /* accept */ "absolute-dynamic-event crescendo-event decrescendo-event",
/* read */ "",
/* write */ "");