Skip to content

Commit

Permalink
Overview Data Table Sort incl. Files
Browse files Browse the repository at this point in the history
.. 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.
  • Loading branch information
liversedge committed Aug 17, 2021
1 parent d57c3c9 commit f9fa6ca
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Charts/OverviewItems.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit f9fa6ca

Please sign in to comment.