]> 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:48:57 +0000 (23:48 +0200)
lily/align-interface.cc
lily/include/system.hh
lily/system.cc

index 07c9ebe3c91c0f0388779c766caee2eb7b34adea..89d2648ae21400a4f889895ce7786e5d0b2b9ea8 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"
 
 /*
@@ -216,7 +217,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 e1a91bf4fa24fe5c8bc41690c1ff4ff13fa1abb9..44bb21d516879af9b452cfb689cb1df605d464df 100644 (file)
@@ -45,6 +45,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 3ca397976b06c890094fdc2673deefc9fbc50833..8fee38257286408c69ed8df8ce4042ece36a7ca2 100644 (file)
@@ -490,6 +490,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
 {