]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/single-malt-grouping-item.cc
patch::: 1.1.39.jcn1: jcn1
[lilypond.git] / lily / single-malt-grouping-item.cc
index d0396e9a9ae505a481be4c68244492fb70fb7d64..025d7f99f08483c47c9e62ff2d6fcc7e0d323b75 100644 (file)
 
 Single_malt_grouping_item ::Single_malt_grouping_item()
 {
-  break_helper_only_b_ = true;
-  transparent_b_ = true;
+  set_elt_property (break_helper_only_scm_sym, SCM_BOOL_T);
+  set_elt_property (transparent_scm_sym, SCM_BOOL_T);
+
+  // this is weird! , but needed!
   set_empty (true);
 }
 
@@ -40,7 +42,13 @@ Single_malt_grouping_item::my_width () const
          warning (_("Single_malt_grouping_item: I've been drinking too much (fixme)"));
          continue;             /*UGH UGH*/ 
        }
-      w.unite  (il->extent (X_AXIS) + il->relative_coordinate (&pc->dim_cache_[X_AXIS], X_AXIS));
+
+      Interval iv (il->extent (X_AXIS));
+      if (!iv.empty_b ())
+       {
+         Real off = il->relative_coordinate (&pc->dim_cache_[X_AXIS], X_AXIS);
+         w.unite  (iv + off);
+       }
     }
 
   return w;
@@ -50,7 +58,8 @@ Single_malt_grouping_item::my_width () const
 
 
 void
-Single_malt_grouping_item::do_substitute_element_pointer (Score_element*o, Score_element*n)
+Single_malt_grouping_item::do_substitute_element_pointer (Score_element*o,
+                                                         Score_element*n)
 {
   if (dynamic_cast <Item *> (o))
     {