X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftime-scaled-music-iterator.cc;h=e70c44a4854a3dfabf5d0709bd5b4e3782d0fd2a;hb=3dd7c6f29c9ca494976f69736b470b6300135099;hp=f5ca62dbfbc67c215b485092bf5f1822613930e5;hpb=f9214bac21e9926dc3248416f58190c98c4167a9;p=lilypond.git diff --git a/lily/time-scaled-music-iterator.cc b/lily/time-scaled-music-iterator.cc index f5ca62dbfb..e70c44a485 100644 --- a/lily/time-scaled-music-iterator.cc +++ b/lily/time-scaled-music-iterator.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--2007 Han-Wen Nienhuys , + (c) 1998--2009 Han-Wen Nienhuys , Erik Sandberg */ @@ -24,7 +24,7 @@ class Time_scaled_music_iterator : public Music_wrapper_iterator public: DECLARE_SCHEME_CALLBACK (constructor, ()); /* construction */ - DECLARE_CLASSNAME(Time_scaled_music_iterator); + DECLARE_CLASSNAME (Time_scaled_music_iterator); Time_scaled_music_iterator (); protected: virtual void process (Moment m); @@ -96,7 +96,7 @@ Time_scaled_music_iterator::process (Moment m) m.main_part_ == next_split_mom_) { descend_to_bottom_context (); - if (tuplet_handler_.get_outlet()) + if (tuplet_handler_.get_outlet ()) create_event (STOP)->send_to_context (tuplet_handler_.get_outlet ()); if (m.main_part_ < music_get_length ().main_part_) @@ -111,7 +111,7 @@ Time_scaled_music_iterator::process (Moment m) tuplet_handler_.set_context (0); } } - Music_wrapper_iterator::process(m); + Music_wrapper_iterator::process (m); if (child_iter_ && child_iter_->ok ()) descend_to_child (child_iter_->get_outlet ()); @@ -120,15 +120,11 @@ Time_scaled_music_iterator::process (Moment m) void Time_scaled_music_iterator::construct_children () { + spanner_duration_ = music_get_length (); + Moment *mp = unsmob_moment (get_outlet ()->get_property ("tupletSpannerDuration")); if (mp) - { - spanner_duration_ = mp->main_part_; - } - else - { - spanner_duration_ = music_get_length (); - } + spanner_duration_ = min (mp->main_part_, spanner_duration_); Music_wrapper_iterator::construct_children ();