From: hanwen Date: Mon, 16 Jun 2003 08:35:34 +0000 (+0000) Subject: * lily/slur.cc: remove slur over rest warnings. X-Git-Tag: release/1.7.25~130 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=af74e1c67013b9b3d42f5a1f1be1a94734bf4385;p=lilypond.git * lily/slur.cc: remove slur over rest warnings. * lily/note-spacing.cc (get_spacing): include left part of right object in fixed space. This fixes stretched space before accidentals. --- diff --git a/ChangeLog b/ChangeLog index 349994c73a..d85873081c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2003-06-16 Han-Wen Nienhuys + * lily/slur.cc: remove slur over rest warnings. + * lily/note-spacing.cc (get_spacing): include left part of right object in fixed space. This fixes stretched space before accidentals. diff --git a/input/regression/spacing-clef-first-note.ly b/input/regression/spacing-clef-first-note.ly index 84f8c1a86d..23e1e892ad 100644 --- a/input/regression/spacing-clef-first-note.ly +++ b/input/regression/spacing-clef-first-note.ly @@ -6,14 +6,14 @@ than clef changes halfway the line." } -\score {\notes { +\score {\notes { < \context Staff = SA { - c2 + c'2 \clef bass e16 f a \clef treble b } \context Staff = SB { - c4 c4 c4 + c'4 c'4 c'4 }> } \paper { raggedright = ##t diff --git a/input/regression/spacing-note-flags.ly b/input/regression/spacing-note-flags.ly index 27e85a5eed..7f9e36527a 100644 --- a/input/regression/spacing-note-flags.ly +++ b/input/regression/spacing-note-flags.ly @@ -8,7 +8,8 @@ texidoc = "The flags of 8th notes take some space, but not \score { \notes \relative c'' \context Staff { \property Voice.autoBeaming = ##f - a8-[ a8 a8 a8] a8 a8 a8 a8 + a8-[ a8 a8 a8] + a8 a8 a8 a8 } \paper { %stafflinethickness = 0.0 diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc index e37f4ff68c..664588ebc7 100644 --- a/lily/note-spacing.cc +++ b/lily/note-spacing.cc @@ -108,7 +108,20 @@ Note_spacing::get_spacing (Grob *me, Item* right_col, FIXED also includes the left part of the right object. */ *fixed = - (left_head_wid.empty_b () ? increment : left_head_wid[RIGHT]) + (left_head_wid.empty_b () ? increment : + /* + Size of the head: + */ + (left_head_wid[RIGHT]+ + + /* + What's sticking out of the head, eg. a flag: + */ + (extents[LEFT][RIGHT] - left_head_wid[RIGHT])/2)) + + /* + What is sticking out of the right note: + */ + (extents[RIGHT].empty_b() ? 0.0 : - extents[RIGHT][LEFT] / 2); /* diff --git a/lily/slur.cc b/lily/slur.cc index 4f71cc62a3..eba766cc31 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -49,9 +49,6 @@ Slur::set_interface (Grob*me) void Slur::add_column (Grob*me, Grob*n) { - if (!gh_pair_p (n->get_grob_property ("note-heads"))) - me->warning (_ ("Putting slur over rest.")); - Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-columns"), n); me->add_dependency (n); @@ -421,7 +418,7 @@ Slur::encompass_offset (Grob*me, if (!stem) { - me->warning (_ ("Slur over rest?")); + programming_error ("No stem for note column?"); o[X_AXIS] = col->relative_coordinate (common[X_AXIS], X_AXIS); o[Y_AXIS] = col->relative_coordinate (common[Y_AXIS], Y_AXIS); return o;