]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/item.cc
Fix beamlet pointing wrong way in tuplets (issue 11).
[lilypond.git] / lily / item.cc
index bf67f3c6dda4d578255a7a3f211c6e28d54c66c1..c3718796e011e9a3e4aaff55028df44c344431d7 100644 (file)
@@ -130,6 +130,15 @@ Item::find_broken_piece (System *l) const
   return 0;
 }
 
+Item *
+Item::maybe_find_prebroken_piece (Item *g, Direction d)
+{
+  Item *ret = g->find_prebroken_piece (d);
+  if (ret)
+    return ret;
+  return g;
+}
+
 Item *
 Item::find_prebroken_piece (Direction d) const
 {
@@ -245,11 +254,17 @@ Item::pure_height (Grob *g, int start, int end)
   if (cached_pure_height_valid_)
     return cached_pure_height_ + pure_relative_y_coordinate (g, start, end);
 
-  cached_pure_height_ = Grob::pure_height (this, start, end);
-  cached_pure_height_valid_ = true;
+  cache_pure_height (Grob::pure_height (this, start, end));
   return cached_pure_height_ + pure_relative_y_coordinate (g, start, end);
 }
 
+void
+Item::cache_pure_height (Interval height)
+{
+  cached_pure_height_ = height;
+  cached_pure_height_valid_ = true;
+}
+
 ADD_INTERFACE (Item,
                "Grobs can be distinguished in their role in the horizontal"
                " spacing.  Many grobs define constraints on the spacing by"