Skip to content

Commit

Permalink
fix #36271: If text contains newline, 'Copy/Paste' operations add unr…
Browse files Browse the repository at this point in the history
…elated characters
  • Loading branch information
lasconic committed Feb 16, 2015
1 parent fc9b1ab commit c0a13fc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libmscore/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2059,15 +2059,17 @@ QString Text::selectedText() const
if (row >= r1 && row <= r2) {
if (row == r1 && r1 == r2)
s += t.text(c1, c2 - c1);
else if (row == r1)
else if (row == r1) {
s += t.text(c1, -1);
s += "\n";
}
else if (row == r2)
s += t.text(0, c2);
else
else {
s += t.text(0, -1);
s += "\n";
}
}
if (row != rows - 1)
s += "\n";
}
return s;
}
Expand Down

0 comments on commit c0a13fc

Please sign in to comment.