X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fconstrained-breaking.cc;h=3a56aa47541190b7bd2f6e2669d5292f7e4d1fac;hb=bbaf60edda2d5dd759050c1046cbd9865f3affbd;hp=1efae87e125047bdd317595a6124408fc5c98e4f;hpb=34f50771ec53f5afbc49923833c32013f25fa1c2;p=lilypond.git diff --git a/lily/constrained-breaking.cc b/lily/constrained-breaking.cc index 1efae87e12..3a56aa4754 100644 --- a/lily/constrained-breaking.cc +++ b/lily/constrained-breaking.cc @@ -4,7 +4,7 @@ source file of the GNU LilyPond music typesetter - (c) 2006--2007 Joe Neeman + (c) 2006--2009 Joe Neeman */ #include "constrained-breaking.hh" @@ -123,6 +123,15 @@ Constrained_breaking::space_line (vsize i, vsize j) bool last = j == breaks_.size () - 1; bool ragged = ragged_right || (last && ragged_last); + /* As a special case, if there is only one line in the score and ragged-right + hasn't been specifically forbidden and the line is stretched, use + ragged spacing. */ + if (last && i == 0 + && lines_.at (i, j).force_ >= 0 + && !scm_is_bool (pscore_->layout ()->c_variable ("ragged-right")) + && !scm_is_bool (pscore_->layout ()->c_variable ("ragged-last"))) + ragged = true; + return get_line_configuration (line, line_dims[RIGHT] - line_dims[LEFT], line_dims[LEFT], ragged); }