]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/separation-item.cc
patch::: 1.5.14.jcn1
[lilypond.git] / lily / separation-item.cc
index 8a777a0df9aadf51563972e725b7ff022fc77953..2c48a347713fd15751621bbc29e1c8dc25035ae9 100644 (file)
@@ -34,9 +34,9 @@ Separation_item::my_width (Grob *me)
   Paper_column * pc = item->column_l ();
   Interval w;
   
-  for (SCM s =  me->get_grob_property ("elements"); gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s =  me->get_grob_property ("elements"); gh_pair_p (s); s = ly_cdr (s))
     {
-      SCM elt = gh_car (s);
+      SCM elt = ly_car (s);
       if (!unsmob_grob (elt))
        continue;
 
@@ -44,7 +44,7 @@ Separation_item::my_width (Grob *me)
       if (pc != il->column_l ())
        {
          /* this shouldn't happen, but let's continue anyway. */
-         programming_error (_("Separation_item:  I've been drinking too much"));
+         programming_error (_ ("Separation_item:  I've been drinking too much"));
          continue;             /*UGH UGH*/ 
        }
 
@@ -56,10 +56,18 @@ Separation_item::my_width (Grob *me)
       Interval iv (il->extent (pc, X_AXIS));
       if (!iv.empty_b ())
        {
-         w.unite  (iv);
+         w.unite (iv);
        }
     }
 
+  SCM pad = me->get_grob_property ("padding");
+
+  if (gh_number_p (pad))
+  {
+    w[RIGHT] += gh_scm2double (pad)/2;
+    w[LEFT] -= gh_scm2double (pad)/2;    
+  }
+  
   return w;
  // add this->offset_ ? this-> relative_coordinate ()? 
 }