]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/melody-spanner.cc
Fix 1259/1433: linebreaks with \breakDynamicSpan or spanners with style=#'none
[lilypond.git] / lily / melody-spanner.cc
index 103a5c642744658ee6ad84d114605ebafc1ab69b..8a96a2feb7de7ec0b35c90f16a44dcca4ebae6fc 100644 (file)
@@ -1,10 +1,21 @@
 /*
-  melody-spanner.cc -- implement Melody_spanner
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the GNU LilyPond music typesetter
+  Copyright (C) 2005--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
-  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
+  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 "melody-spanner.hh"
@@ -20,7 +31,7 @@
 /*
   Interpolate stem directions for neutral stems.
  */
-MAKE_SCHEME_CALLBACK(Melody_spanner,calc_neutral_stem_direction, 1);
+MAKE_SCHEME_CALLBACK (Melody_spanner, calc_neutral_stem_direction, 1);
 SCM
 Melody_spanner::calc_neutral_stem_direction (SCM smob)
 {
@@ -42,7 +53,7 @@ Melody_spanner::calc_neutral_stem_direction (SCM smob)
     next_nonneutral++;
 
   SCM retval = SCM_EOL;
-  while (last_nonneutral == VPOS || last_nonneutral < dirs.size () - 1
+  while (last_nonneutral == VPOS || last_nonneutral + 1 < dirs.size ()
     {
       Direction d1 = CENTER;
       Direction d2 = CENTER;
@@ -95,7 +106,9 @@ Melody_spanner::add_stem (Grob *me, Grob *stem)
 ADD_INTERFACE (Melody_spanner,
               "Context dependent typesetting decisions.",
 
+              /* properties */
               "stems "
-              "neutral-direction ");
+              "neutral-direction "
+              );