/*
- time-scaled-music-iterator.cc -- implement Time_scaled_music_iterator
+ This file is part of LilyPond, the GNU music typesetter.
- source file of the GNU LilyPond music typesetter
-
- (c) 1998--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>,
+ Copyright (C) 1998--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>,
Erik Sandberg <mandolaerik@gmail.com>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
*/
#include "context.hh"
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 ();