]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix pure-estimation during two-pass spacing.
authorJoe Neeman <joeneeman@gmail.com>
Tue, 26 Dec 2006 21:48:57 +0000 (23:48 +0200)
committerJoe Neeman <joeneeman@gmail.com>
Tue, 26 Dec 2006 21:49:32 +0000 (23:49 +0200)
(cherry picked from 6a8c839c794cd9e68b8ea2049b5edd6f13ddf4e0 commit)

lily/align-interface.cc
lily/include/system.hh
lily/system.cc

index 736ecb9096a51a48111595b51d938b74c896189a..eb02bc864dad4de63cb3dd396d71fb8d01d6198c 100644 (file)
@@ -14,6 +14,7 @@
 #include "hara-kiri-group-spanner.hh"
 #include "grob-array.hh"
 #include "international.hh"
+#include "system.hh"
 #include "warn.hh"
 
 /*
@@ -158,7 +159,10 @@ Align_interface::get_extents_aligned_translates (Grob *me,
   SCM line_break_details = SCM_EOL;
   if (a == Y_AXIS && me_spanner)
     {
-      line_break_details = me_spanner->get_bound (LEFT)->get_property ("line-break-system-details");
+      if (pure)
+       line_break_details = get_root_system (me)->column (start)->get_property ("line-break-system-details");
+      else
+       line_break_details = me_spanner->get_bound (LEFT)->get_property ("line-break-system-details");
 
       if (!me->get_system () && !pure)
        me->warning (_ ("vertical alignment called before line-breaking.\n"
index 2fe740fddb954d6c5dc0befbec6ca6d2dc92c3ed..429de91baabe89e2b23b6dba58acf05eec142083 100644 (file)
@@ -43,6 +43,7 @@ public:
 
   vector<Item*> broken_col_range (Item const *, Item const *) const;
   vector<Grob*> columns () const;
+  Grob *column (int i) const;
 
   void add_column (Paper_column *);
   void typeset_grob (Grob *);
index ae1abd60c9361f6ca19828f9fb49aa63d41e0429..8735da159467210dd943b16f5681e8e419e693cd 100644 (file)
@@ -477,6 +477,17 @@ System::columns () const
   return columns;
 }
 
+Grob*
+System::column (int which) const
+{
+  extract_grob_set (this, "columns", columns);
+  for (vsize i = 0; i < columns.size (); i++)
+    if (dynamic_cast<Paper_column*> (columns[i])->get_rank () == which)
+      return columns[i];
+  programming_error ("couldn't find the column of the requested index");
+  return columns[0];
+}
+
 Paper_score*
 System::paper_score () const
 {