X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fitem.cc;h=0c3169a7766f31860ef77b978ad7829c017f58b1;hb=2da5c55cf0a968982223682227a0cf3b019d03a8;hp=6a468a6830607f6522f786c7dc15cfefdebdd5b8;hpb=525a57c5bc0ce6f92af465d1aa9653c5a8db82e1;p=lilypond.git diff --git a/lily/item.cc b/lily/item.cc index 6a468a6830..0c3169a776 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2011 Han-Wen Nienhuys + Copyright (C) 1997--2012 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -55,9 +55,6 @@ Item::Item (Item const &s) bool Item::is_non_musical (Grob *me) { - if (me->original ()) - return false; - Item *i = dynamic_cast (me->get_parent (X_AXIS)); return i ? Item::is_non_musical (i) : to_boolean (me->get_property ("non-musical")); } @@ -105,7 +102,7 @@ Item::is_broken () const void Item::discretionary_processing () { - if (is_broken ()) + if (is_broken () || original ()) return; if (Item::is_non_musical (this)) @@ -244,6 +241,10 @@ 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); + /* Note: cached_pure_height_ does not notice if start changes, implicitly + assuming that Items' pure_heights do not depend on 'start' or 'end'. + Accidental_interface::pure_height(), however, does depend on 'start'. + */ cache_pure_height (Grob::pure_height (this, start, end)); return cached_pure_height_ + pure_relative_y_coordinate (g, start, end);