Skip to content

Commit

Permalink
fix #279999, fix #280857: draw selected notes on top, invisible notes…
Browse files Browse the repository at this point in the history
… on bottom
  • Loading branch information
MarcSabatella committed Feb 26, 2019
1 parent c9a301a commit 23318a8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libmscore/element.cpp
Expand Up @@ -1080,6 +1080,18 @@ Element* Element::name2Element(const QStringRef& s, Score* sc)

bool elementLessThan(const Element* const e1, const Element* const e2)
{
if (e1->z() == e2->z()) {
if (e1->selected())
return false;
else if (e2->selected())
return true;
else if (!e1->visible())
return true;
else if (!e2->visible())
return false;
else
return e1->track() > e2->track();
}
return e1->z() <= e2->z();
}

Expand Down

0 comments on commit 23318a8

Please sign in to comment.