/*
- tie-performer.cc -- implement
+ tie-performer.cc -- implement Tie_performer
source file of the GNU LilyPond music typesetter
- (c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1999--2000 Jan Nieuwenhuizen <janneke@gnu.org>
*/
bool
Tie_performer::do_try_music (Music *m)
{
- if (Tie_req * c = dynamic_cast<Tie_req*> (m))
+ if (!req_l_)
{
- req_l_ = c;
- return true;
+ if (Tie_req * c = dynamic_cast<Tie_req*> (m))
+ {
+ req_l_ = c;
+ return true;
+ }
}
return false;
}
}
void
-Tie_performer::do_process_requests ()
+Tie_performer::do_process_music ()
{
if (req_l_)
{
for (int i=0; i< tie_p_arr_.size (); i++)
{
//play_element (tie_p_arr_[i]);
- /*
- urg.
- doesn't work for c ~ c ~ c
- */
- tie_p_arr_[i]->note_l_drul_[LEFT]->length_mom_ +=
- tie_p_arr_[i]->note_l_drul_[RIGHT]->length_mom_;
- tie_p_arr_[i]->note_l_drul_[RIGHT]->length_mom_ = 0;
- }
+ tie_p_arr_[i]->note_l_drul_[RIGHT]->tie_to (tie_p_arr_[i]->note_l_drul_[LEFT]);
+ }
tie_p_arr_.clear ();
}