Overview Data Table Sort incl. Files

.. when sorting the table we sorted all the columns that are
   visible to the user, but not the associated filenames
   that are used by clickthru, so clickthru would jump to the
   wrong activity.
This commit is contained in:
Mark Liversedge
2021-08-17 19:36:23 +01:00
parent d57c3c9ce5
commit f9fa6ca401

View File

@@ -1147,6 +1147,17 @@ DataOverviewItem::sort(int column, Qt::SortOrder order)
// phew!
values = ordered;
// don't forget the filenames used in clickthru
if (files.count()) {
QVector<QString> newfiles = files;
// resequence
for(int k=0; k<argsortindex.count() && k < newfiles.count(); k++)
newfiles[k] = files[argsortindex[k]];
files = newfiles;
}
lastsort = column;
lastorder = order;
}