]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/item.cc
Fix 1896: chord names can have instrument names.
[lilypond.git] / lily / item.cc
index 4e9818192aad73b851129f72d5a70194d67a8797..6a468a6830607f6522f786c7dc15cfefdebdd5b8 100644 (file)
@@ -245,11 +245,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"
@@ -270,7 +276,7 @@ ADD_INTERFACE (Item,
                "Whether these versions are visible and take up space is"
                " determined by the outcome of the @code{break-visibility}"
                " grob property, which is a function taking a direction"
-               " (@code{-1}, @code{0} or@tie{}@code{1}) as an argument.  It"
+               " (@w{@code{-1}}, @code{0} or@tie{}@code{1}) as an argument.  It"
                " returns a cons of booleans, signifying whether this grob"
                " should be transparent and have no extent.\n"
                "\n"