]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/volta-bracket.cc
Fix 1259/1433: linebreaks with \breakDynamicSpan or spanners with style=#'none
[lilypond.git] / lily / volta-bracket.cc
index 6e649b088a2e85a6944bbf9e1a27c3868e5a3f88..6877a1a2eb05f7046eb04bf55b34652760524788 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2010 Jan Nieuwenhuizen <janneke@gnu.org>
+  Copyright (C) 1997--2011 Jan Nieuwenhuizen <janneke@gnu.org>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -57,14 +57,17 @@ Volta_bracket_interface::print (SCM smob)
   Item *bound = dynamic_cast<Spanner *> (me)->get_bound (LEFT);
 
   /*
-    not a start, but really broken in two
+    If the volta bracket appears after a line-break, make
+    it start after the prefatory matter.
   */
   Real left = 0.;
   if (bound->break_status_dir () == RIGHT)
     {
       Paper_column *pc = bound->get_column ();
-      left = pc->extent (pc, X_AXIS)[RIGHT]
-       - bound->relative_coordinate (pc, X_AXIS);
+      left = pc->break_align_width (pc, ly_symbol2scm ("break-alignment"))[RIGHT]
+       // For some reason, break_align_width is relative to
+       // the x-parent of the column.
+       - bound->relative_coordinate (pc->get_parent (X_AXIS), X_AXIS);
     }
   else
     {