Skip to content

Commit a5b8c28

Browse files
committed
Fix highlighting of range selections that span till the end of the score
1 parent d454d80 commit a5b8c28

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/notation/internal/notationselectionrange.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@ mu::engraving::Segment* NotationSelectionRange::rangeEndSegment() const
167167
{
168168
mu::engraving::Segment* endSegment = score()->selection().endSegment();
169169

170-
if (!endSegment) {
171-
return nullptr;
170+
if (endSegment && !endSegment->enabled()) {
171+
endSegment = endSegment->next1MMenabled();
172172
}
173173

174-
if (!endSegment->enabled()) {
175-
endSegment = endSegment->next1MMenabled();
174+
if (!endSegment) {
175+
endSegment = score()->lastSegmentMM();
176176
}
177177

178178
return endSegment;

0 commit comments

Comments
 (0)