Fix plain text copy to print selected columns

The case being fixed is when non contiguous columns were selected, e.g.
column 3 and 7
This commit is contained in:
Srivats P 2020-03-22 13:26:38 +05:30
parent 6791eb06dd
commit 79ac3a2a20

View File

@ -167,8 +167,9 @@ private:
}
text.append("\t"); // column header for row number/title
for (int i = start; i < end; i++)
text.append(model()->headerData(i, Qt::Horizontal)
.toString()+"\t");;
if (indexes.contains(model()->index(indexes.first().row(), i)))
text.append(model()->headerData(i, Qt::Horizontal)
.toString()+"\t");;
text.append("\n");
}