X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fhara-kiri-group-spanner.cc;h=a682a0aa6da887c63333c630c44cfa72b280232d;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=b7c55b5045f903b0b22ec46c3b5cd10a707b0dc5;hpb=5bbfc22fce036b9b69df5e420de93e11da23c05e;p=lilypond.git diff --git a/lily/hara-kiri-group-spanner.cc b/lily/hara-kiri-group-spanner.cc index b7c55b5045..a682a0aa6d 100644 --- a/lily/hara-kiri-group-spanner.cc +++ b/lily/hara-kiri-group-spanner.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1998--2014 Jan Nieuwenhuizen + Copyright (C) 1998--2015 Jan Nieuwenhuizen Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify @@ -77,6 +77,11 @@ bool find_in_range (SCM vector, int low, int hi, int min, int max) bool Hara_kiri_group_spanner::request_suicide (Grob *me, int start, int end) { + extract_grob_set (me, "make-dead-when", foes); + for (vsize i = 0; i < foes.size (); i++) + if (foes[i]->is_live () && !request_suicide_alone (foes[i], start, end)) + return true; + if (!request_suicide_alone (me, start, end)) return false; @@ -185,13 +190,16 @@ Hara_kiri_group_spanner::add_interesting_item (Grob *me, Grob *n) ADD_INTERFACE (Hara_kiri_group_spanner, "A group spanner that keeps track of interesting items. If it" " doesn't contain any after line breaking, it removes itself" - " and all its children.", + " and all its children. Children may be prioritized in layers" + " via @code{remove-layer}, in which case only the" + " lowest-numbered non-empty layer is retained.", /* properties */ "items-worth-living " "important-column-ranks " "keep-alive-with " + "make-dead-when " "remove-empty " "remove-first " + "remove-layer " ); -