]> git.donarmstrong.com Git - lilypond.git/commitdiff
Make BassFigureAlignment ignore alignment-distances.
authorJoe Neeman <joeneeman@gmail.com>
Thu, 26 May 2011 18:45:18 +0000 (21:45 +0300)
committerJoe Neeman <joeneeman@gmail.com>
Fri, 27 May 2011 16:24:52 +0000 (19:24 +0300)
input/regression/page-spacing-bass-figures.ly [new file with mode: 0644]
lily/align-interface.cc

diff --git a/input/regression/page-spacing-bass-figures.ly b/input/regression/page-spacing-bass-figures.ly
new file mode 100644 (file)
index 0000000..8a3fef0
--- /dev/null
@@ -0,0 +1,19 @@
+\version "2.15.0"
+
+\header {
+  texidoc = "@var{alignment-distances} applies to the toplevel
+VerticalAlignment but not to BassFigureAlignment.  The 4 in
+the bass figure line should be directly below the 6."
+}
+
+\score {
+ <<
+   \new Staff {
+     \overrideProperty #"Score.NonMusicalPaperColumn"
+     #'line-break-system-details #'((alignment-distances . (15)))
+     c'4
+   }
+   \new Staff <<
+     { d'4 }
+     \figures { <6 4>4 } >> >>
+ }
index cb876f5bbf1de0297f590d7e79c3902a26af3ebe..5741a442728ab65cb834f65402da11dd36ac2ca5 100644 (file)
@@ -182,6 +182,13 @@ Align_interface::internal_get_minimum_translations (Grob *me,
 {
   if (!pure && a == Y_AXIS && dynamic_cast<Spanner*> (me) && !me->get_system ())
     me->programming_error ("vertical alignment called before line-breaking");
+
+  // If include_fixed_spacing is true, we look at things like system-system-spacing
+  // and alignment-distances, which only make sense for the toplevel VerticalAlignment.
+  // If we aren't toplevel, we're working on something like BassFigureAlignment
+  // and so we definitely don't want to include alignment-distances!
+  if (!dynamic_cast<System*> (me->get_parent (Y_AXIS)))
+    include_fixed_spacing = false;
   
   Direction stacking_dir = robust_scm2dir (me->get_property ("stacking-dir"),
                                           DOWN);