X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fspacing-spanner.cc;h=657ff0cd6a9d2b6541b87bfdd8f6a789dbdcf13b;hb=38c1148ef2d73151379e9a694c3c061d8a31d548;hp=b09384f7df1f03d11744e097909cb4f471a48805;hpb=6e39f536c11c8a65d3e99a43cc9dd9593c61fa4f;p=lilypond.git diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index b09384f7df..657ff0cd6a 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1999--2011 Han-Wen Nienhuys + Copyright (C) 1999--2012 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -261,8 +261,7 @@ set_column_rods (vector const &cols, Real padding) Real left_stickout = skys ? (*skys)[RIGHT].max_height () : 0.0; bool done = true; - Direction d = LEFT; - do + for (LEFT_and_RIGHT (d)) { if (j < i - 1) cur_dist[d] += distances[j]; @@ -287,8 +286,10 @@ set_column_rods (vector const &cols, Real padding) cur_dist[d] = max (cur_dist[d], dist); done = done && !touches; + + if (!rb) + break; } - while (flip (&d) != LEFT && rb); /* we need the empty check for gregorian notation, where there are a lot of extraneous paper-columns that we need to skip over */