lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stem.cc - issue 5303 - misplaced notehead (issue 570830043 by address@hi


From: pkxgnugitcl
Subject: stem.cc - issue 5303 - misplaced notehead (issue 570830043 by address@hidden)
Date: Thu, 04 Jul 2019 13:03:01 -0700

Reviewers: ,

Message:
Passes make, make check and a full make doc.

Description:
stem.cc - issue 5303 - misplaced notehead

In loop calculating the attachments
of chord node heads to stem,
calculate last used position by
_rounding_ to int rather than by
truncating to int.

This fixes issue 5303 (misplaced note head bug).

Also add regression test.

Please review this at https://codereview.appspot.com/570830043/

Affected files (+15, -1 lines):
  A input/regression/misplaced-note-head-bug.ly
  M lily/stem.cc


Index: input/regression/misplaced-note-head-bug.ly
diff --git a/input/regression/misplaced-note-head-bug.ly b/input/regression/misplaced-note-head-bug.ly
new file mode 100644
index 0000000000000000000000000000000000000000..1e5918631c27039e7f75dbf44c6f215363aaa970
--- /dev/null
+++ b/input/regression/misplaced-note-head-bug.ly
@@ -0,0 +1,14 @@
+\version "2.19.16"
+
+\header {
+
+  texidoc = "Misplaced note head bug (issue 5303) should be fixed."
+
+}
+
+\layout {
+  #(layout-set-staff-size 19)
+}
+
+
+{ <d' f' a'>2 \clef bass <f, a, c> }
Index: lily/stem.cc
diff --git a/lily/stem.cc b/lily/stem.cc
index 37aa40c250934eb08d1bc6f16bd7598671099193..34bf557fca9c538f22c5fe9c3ff85895ab0f2bca 100644
--- a/lily/stem.cc
+++ b/lily/stem.cc
@@ -626,7 +626,7 @@ Stem::calc_positioning_done (SCM smob)
       else
         parity = true;

-      lastpos = int (p);
+      lastpos = int (round (p));
     }

   return SCM_BOOL_T;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]