1
0
Fork 0

GUI: fixed copy selection

This commit is contained in:
mrexodia 2016-06-03 22:16:29 +02:00
parent 597298f90f
commit cb0596139d
No known key found for this signature in database
GPG Key ID: D72F9A4FAA0073B4
1 changed files with 5 additions and 2 deletions

View File

@ -194,7 +194,7 @@ QString HexDump::makeCopyText()
deltaRowBase -= getBytePerRowCount();
auto curRow = getSelectionStart() - deltaRowBase;
QString result;
while(curRow < getSelectionEnd())
while(curRow <= getSelectionEnd())
{
for(int col = 0; col < getColumnCount(); col++)
{
@ -205,7 +205,10 @@ QString HexDump::makeCopyText()
QString colText;
for(auto & r : richText)
colText += r.text;
result += colText.leftJustified(getColumnWidth(col) / getCharWidth(), QChar(' '), true);
if(col + 1 == getColumnCount())
result += colText;
else
result += colText.leftJustified(getColumnWidth(col) / getCharWidth(), QChar(' '), true);
}
curRow += getBytePerRowCount();
result += "\n";