diff options
author | Paul Morris <paulwmorris@gmail.com> | 2016-01-06 16:29:46 -0500 |
---|---|---|
committer | James Lowe <pkx166h@gmail.com> | 2016-01-16 11:31:59 +0000 |
commit | 8dfb8cb1d1c7cdb47635ec49b7103194a447e2f9 (patch) | |
tree | 54962d7f82536ce6796b2d5494892d23e286aefa /lily | |
parent | a25ed225a877a9eec1212733f8ed9ee65ab7bfb6 (diff) |
Do not draw ledger lines on top of staff lines
when StaffSymbol.ledger-extra > 0
Diffstat (limited to 'lily')
-rw-r--r-- | lily/staff-symbol.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lily/staff-symbol.cc b/lily/staff-symbol.cc index de88102d14..256a9bdd0d 100644 --- a/lily/staff-symbol.cc +++ b/lily/staff-symbol.cc @@ -247,7 +247,20 @@ Staff_symbol::ledger_positions (Grob *me, int pos) values[i] = nearest_line + dir * (ledger_count - i) * 2; } } - return values; + // remove any ledger lines that would fall on staff lines, + // which can happen when ledger-extra > 0 + vector<Real> final_values; + for (vector<Real>::const_iterator i = values.begin (), + e = values.end (); + i != e; + ++i) + { + if (find (line_positions.begin (), line_positions.end (), *i) == line_positions.end ()) + { + final_values.push_back (*i); + } + } + return final_values; } int |