Skip to content

Commit

Permalink
fix #287747: bad drawing of selection with disabled segment
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Apr 15, 2019
1 parent 25c8a3e commit 6eb7079
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion mscore/scoreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,13 @@ void ScoreView::paint(const QRect& r, QPainter& p)
if (!ss)
return;

if (!ss->enabled())
ss = ss->next1MMenabled();
if (es && !es->enabled())
es = es->prev1MMenabled();
if (es && ss->tick() > es->tick()) // start after end?
return;

if (!ss->measure()->system()) {
// segment is in a measure that has not been laid out yet
// this can happen in mmrests
Expand Down Expand Up @@ -1258,7 +1265,7 @@ void ScoreView::paint(const QRect& r, QPainter& p)
double x1;

for (Segment* s = ss; s && (s != es); ) {
Segment* ns = s->next1MM();
Segment* ns = s->next1MMenabled();
system1 = system2;
system2 = s->measure()->system();
if (!system2) {
Expand Down

0 comments on commit 6eb7079

Please sign in to comment.