OLD | NEW |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>, | 4 Copyright (C) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>, |
5 Erik Sandberg <mandolaerik@gmail.com> | 5 Erik Sandberg <mandolaerik@gmail.com> |
6 | 6 |
7 LilyPond is free software: you can redistribute it and/or modify | 7 LilyPond is free software: you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation, either version 3 of the License, or | 9 the Free Software Foundation, either version 3 of the License, or |
10 (at your option) any later version. | 10 (at your option) any later version. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 } | 119 } |
120 Music_wrapper_iterator::process (m); | 120 Music_wrapper_iterator::process (m); |
121 if (child_iter_ && child_iter_->ok ()) | 121 if (child_iter_ && child_iter_->ok ()) |
122 descend_to_child (child_iter_->get_outlet ()); | 122 descend_to_child (child_iter_->get_outlet ()); |
123 | 123 |
124 } | 124 } |
125 | 125 |
126 void | 126 void |
127 Tuplet_iterator::construct_children () | 127 Tuplet_iterator::construct_children () |
128 { | 128 { |
129 spanner_duration_ = music_get_length (); | 129 if (Duration *d = unsmob_duration (get_music ()->get_property ("duration"))) |
| 130 spanner_duration_ = d->get_length (); |
| 131 else |
| 132 { |
| 133 spanner_duration_ = music_get_length (); |
130 | 134 |
131 Moment *mp | 135 Moment *mp |
132 = unsmob_moment (get_outlet ()->get_property ("tupletSpannerDuration")); | 136 = unsmob_moment (get_outlet ()->get_property ("tupletSpannerDuration")); |
133 if (mp) | 137 if (mp) |
134 spanner_duration_ = min (mp->main_part_, spanner_duration_); | 138 spanner_duration_ = min (mp->main_part_, spanner_duration_); |
| 139 } |
135 | 140 |
136 Music_wrapper_iterator::construct_children (); | 141 Music_wrapper_iterator::construct_children (); |
137 | 142 |
138 if (child_iter_ && child_iter_->ok ()) | 143 if (child_iter_ && child_iter_->ok ()) |
139 descend_to_child (child_iter_->get_outlet ()); | 144 descend_to_child (child_iter_->get_outlet ()); |
140 } | 145 } |
141 | 146 |
142 void | 147 void |
143 Tuplet_iterator::derived_mark () const | 148 Tuplet_iterator::derived_mark () const |
144 { | 149 { |
145 scm_gc_mark (synthesized_events_); | 150 scm_gc_mark (synthesized_events_); |
146 Music_wrapper_iterator::derived_mark (); | 151 Music_wrapper_iterator::derived_mark (); |
147 } | 152 } |
148 | 153 |
149 IMPLEMENT_CTOR_CALLBACK (Tuplet_iterator); | 154 IMPLEMENT_CTOR_CALLBACK (Tuplet_iterator); |
OLD | NEW |