summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith OHara <k-ohara5a5a@oco.net>2015-07-18 20:07:08 -0700
committerKeith OHara <k-ohara5a5a@oco.net>2015-07-25 22:23:48 -0700
commit28417a72cb60cc69ac5a4916d0dfdda9b78079fa (patch)
tree9d8f0cacbc1412d66d01fdb2c915877437e8d731
parent0a34e892b31530e87380bffaac0bb9cf9a1c8a91 (diff)
note-collision: left-align just the notes without force-hshift;
-rw-r--r--input/regression/collision-alignment.ly21
-rw-r--r--input/regression/collision-manual.ly37
-rw-r--r--lily/note-collision.cc4
3 files changed, 25 insertions, 37 deletions
diff --git a/input/regression/collision-alignment.ly b/input/regression/collision-alignment.ly
deleted file mode 100644
index 428277be93..0000000000
--- a/input/regression/collision-alignment.ly
+++ /dev/null
@@ -1,21 +0,0 @@
-\header {
-
- texidoc = "Notes in different staves should be aligned to the
- left-most note, in case of collisions."
-
-}
-
-\layout { ragged-right = ##t }
-
-\version "2.19.21"
-
-\relative <<
- \new Staff {
- <<
- { f' g } \\
- { g f }
- >> }
- \new Staff {
- c4 c
- }
->>
diff --git a/input/regression/collision-manual.ly b/input/regression/collision-manual.ly
index 9fad6597d7..b39b0eafeb 100644
--- a/input/regression/collision-manual.ly
+++ b/input/regression/collision-manual.ly
@@ -1,17 +1,28 @@
\header {
-
- texidoc = "Collision resolution may be forced manually with @code{force-hshift}. "
+ texidoc = "Colliding note-columns may be shifted manually
+with @code{force-hshift}. Arrangements of notes after
+collision-resolution have their main columns (not suspended notes)
+left-aligned, excluding columns with forced shifts."
}
-\version "2.19.21"
+\version "2.19.24"
-\paper {
- ragged-right = ##t
-}
+\new PianoStaff \with { \consists #Span_stem_engraver } <<
+ \new Staff \fixed c' <<
+ \new Voice {
+ \voiceOne f e
+ \crossStaff
+ \once\override NoteColumn.force-hshift = #-0.8
+ f
+ \once\override NoteColumn.force-hshift = #-1.5
+ e
+ }
+ \new Voice {
+ \voiceTwo e f
+ \once\override NoteColumn.force-hshift = #0
+ \crossStaff e
+ \crossStaff f
+ }
+ >>
+ \new Staff {\clef bass g g e f }
+>>
-\relative {
- << { f'
- \override NoteColumn.force-hshift = #0.1
- f } \\
- { e e }
- >>
-}
diff --git a/lily/note-collision.cc b/lily/note-collision.cc
index a9564951f3..0ef6b7b4e0 100644
--- a/lily/note-collision.cc
+++ b/lily/note-collision.cc
@@ -392,7 +392,7 @@ Note_collision_interface::calc_positioning_done (SCM smob)
}
vector<Grob *> done;
- Real left_most = 1e6;
+ Real left_most = 0.0;
vector<Real> amounts;
for (; scm_is_pair (hand); hand = scm_cdr (hand))
@@ -402,8 +402,6 @@ Note_collision_interface::calc_positioning_done (SCM smob)
done.push_back (s);
amounts.push_back (amount);
- if (amount < left_most)
- left_most = amount;
}
for (; scm_is_pair (autos); autos = scm_cdr (autos))
{