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