X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fitem.cc;h=c3718796e011e9a3e4aaff55028df44c344431d7;hb=44155056614ee1ff6b3bf4f286bdb386147c21a2;hp=bf67f3c6dda4d578255a7a3f211c6e28d54c66c1;hpb=a066a93ee74edebb9d238a1bac93c3bc7e8e6e4a;p=lilypond.git diff --git a/lily/item.cc b/lily/item.cc index bf67f3c6dd..c3718796e0 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -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"