Skip to content

Commit

Permalink
skip segments with only invisible annotations
Browse files Browse the repository at this point in the history
Duplicate of musescore#6312, part 2. Expected vtests differences.
  • Loading branch information
MarcSabatella authored and Jojo-Schmitz committed Sep 29, 2021
1 parent 3f18474 commit 1a87914
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libmscore/segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2098,6 +2098,8 @@ void Segment::createShape(int staffIdx)
continue;
int effectiveTrack = e->vStaffIdx() * VOICES + e->voice();
if (effectiveTrack >= strack && effectiveTrack < etrack) {
// TODO: we could choose to ignore invisible/no-autoplace notes & rests
// but these might be relied upon by some
setVisible(true);
if (e->addToSkyline())
s.add(e->shape().translated(e->pos()));
Expand All @@ -2107,9 +2109,10 @@ void Segment::createShape(int staffIdx)
for (Element* e : _annotations) {
if (!e || e->staffIdx() != staffIdx)
continue;
setVisible(true);
if (!e->addToSkyline())
continue;
// TODO: will skipping segments that contain only invisible annotations adversely affect playback or anything else?
setVisible(true);

if (e->isHarmony()) {
// use same spacing calculation as for chordrest
Expand Down

0 comments on commit 1a87914

Please sign in to comment.