From: Keith OHara Date: Tue, 20 Dec 2011 03:10:50 +0000 (-0800) Subject: Honor Rest #'direction; issue 1410 X-Git-Tag: release/2.15.24-1~58 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ec67d7ff3855aa35e217537417d72e92ea11d262;p=lilypond.git Honor Rest #'direction; issue 1410 --- diff --git a/input/regression/rest-polyphonic.ly b/input/regression/rest-polyphonic.ly index 2a210d0d85..5360bcb078 100644 --- a/input/regression/rest-polyphonic.ly +++ b/input/regression/rest-polyphonic.ly @@ -1,8 +1,8 @@ \header { - texidoc = "In polyphonic situations, rests are moved down -even if there is no opposite note or rest. The amount is two -@code{staff-space}s. " + texidoc = "In polyphonic situations, rests are moved according +to their @code{direction} even if there is no opposite note or rest. +The amount is two @code{staff-space}s. " } @@ -13,8 +13,8 @@ even if there is no opposite note or rest. The amount is two \new Staff \relative c' { - << { r8 g''4 g8 r g4 g8 } \\ - { d,4 r d r } >> + << { r8 g''4 g8 r g4 g8 } \\ + { d,4 r \stemUp b r } >> } diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index fc8a4b401d..3a78163774 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -207,11 +207,12 @@ Rest_collision::calc_positioning_done (SCM smob) for (vsize i = 0; i < rests.size (); i++) { Grob *rcol = rests[i]; - Direction dir = Note_column::dir (rcol); + Grob *rest = Note_column::get_rest (rcol); + + Direction dir = get_grob_direction (rest); if (!dir) - continue; + dir = Note_column::dir (rcol); - Grob *rest = Note_column::get_rest (rcol); // Do not compute a translation for pre-positioned rests, // nor count them for the "too many colliding rests" warning if (scm_is_number (rest->get_property ("staff-position")))