X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftuplet-iterator.cc;h=ca7533dce903b301d36c1ddd4356b5f165cccbde;hb=c39d188d28fdc84cef8cbaea7b8d6e2fb718c30f;hp=5f3548e4905975f41392f5b5d40ca3a98dce631b;hpb=4bb29573149a0ffa1f881c5e38a0fe68e9e76b67;p=lilypond.git diff --git a/lily/tuplet-iterator.cc b/lily/tuplet-iterator.cc index 5f3548e490..ca7533dce9 100644 --- a/lily/tuplet-iterator.cc +++ b/lily/tuplet-iterator.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1998--2011 Han-Wen Nienhuys , + Copyright (C) 1998--2014 Han-Wen Nienhuys , Erik Sandberg LilyPond is free software: you can redistribute it and/or modify @@ -104,8 +104,8 @@ Tuplet_iterator::process (Moment m) && m.main_part_ == next_split_mom_) { descend_to_bottom_context (); - if (tuplet_handler_.get_outlet ()) - create_event (STOP)->send_to_context (tuplet_handler_.get_outlet ()); + if (tuplet_handler_.get_context ()) + create_event (STOP)->send_to_context (tuplet_handler_.get_context ()); if (m.main_part_ < music_get_length ().main_part_) { @@ -126,12 +126,17 @@ Tuplet_iterator::process (Moment m) void Tuplet_iterator::construct_children () { - spanner_duration_ = music_get_length (); + if (Duration *d = unsmob_duration (get_music ()->get_property ("duration"))) + spanner_duration_ = d->get_length (); + else + { + spanner_duration_ = music_get_length (); - Moment *mp - = unsmob_moment (get_outlet ()->get_property ("tupletSpannerDuration")); - if (mp) - spanner_duration_ = min (mp->main_part_, spanner_duration_); + Moment *mp + = unsmob_moment (get_outlet ()->get_property ("tupletSpannerDuration")); + if (mp) + spanner_duration_ = min (mp->main_part_, spanner_duration_); + } Music_wrapper_iterator::construct_children ();