X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Fspacing-interface.cc;h=6e8027bc8c31b445833bc842593c188651175aa7;hb=e19a4a25b9dcc34ffef13a583d45dc2a529998a5;hp=c5a7e000c1cc6199af743260142262b92ff0ad1e;hpb=a6a4b3fc2009f17a1a48cca0c11bfd3f38645937;p=lilypond.git diff --git a/lily/spacing-interface.cc b/lily/spacing-interface.cc index c5a7e000c1..6e8027bc8c 100644 --- a/lily/spacing-interface.cc +++ b/lily/spacing-interface.cc @@ -4,7 +4,7 @@ source file of the GNU LilyPond music typesetter - (c) 2007--2008 Joe Neeman + (c) 2007--2009 Joe Neeman */ #include "spacing-interface.hh" @@ -92,20 +92,7 @@ Spacing_interface::minimum_distance (Grob *me, Grob *right) } /* - Compute the column of the right-items. This is a big function, - since RIGHT-ITEMS may span more columns (eg. if a clef is inserted, - this will add a new column to RIGHT-ITEMS. Here we look at the - columns, and return the left-most. If there are multiple columns, we - prune RIGHT-ITEMS. - - If we end up pruning, we add a left-neighbor to every column that - gets pruned. This ensures that loose columns in cross-staff music - do indeed get marked as loose. The problem situation is when a voice - passes from staff 1 to staff 2 and a clef appears later on in staff 1. - Then the NoteSpacing attached to the last note in staff 1 has two - right-items: one pointing to the next note in staff 2 and one pointing - to the clef. We will prune the clef right-item here and, unless we add - a left-neighbor to the clef, it won't get marked as loose. + Compute the left-most column of the right-items. */ Item * Spacing_interface::right_column (Grob *me) @@ -116,7 +103,6 @@ Spacing_interface::right_column (Grob *me) Grob_array *a = unsmob_grob_array (me->get_object ("right-items")); Item *mincol = 0; int min_rank = INT_MAX; - bool prune = false; for (vsize i = 0; a && i < a->size (); i++) { Item *ri = a->item (i); @@ -127,31 +113,8 @@ Spacing_interface::right_column (Grob *me) if (rank < min_rank) { min_rank = rank; - if (mincol) - prune = true; - mincol = col; } - else if (rank > min_rank) - prune = true; - } - - if (prune && a) - { - vector &right = a->array_reference (); - for (vsize i = right.size (); i--;) - { - if (dynamic_cast (right[i])->get_column () != mincol) - { - extract_grob_set (right[i], "left-neighbors", lns); - if (lns.empty ()) - Pointer_group_interface::add_grob (right[i], - ly_symbol2scm ("left-neighbors"), - dynamic_cast (me)->get_column ()); - - right.erase (right.begin () + i); - } - } } return mincol;