Skip to content

Commit

Permalink
Only sort WTrackTableView instance if it is visible
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed May 28, 2019
1 parent 939ca38 commit 8f94fae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/widget/wtracktableview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1781,6 +1781,12 @@ void WTrackTableView::doSortByColumn(int headerSection) {
}

void WTrackTableView::applySorting() {
// There are multiple instances of WTrackTableView, but we only want to
// apply the sorting to the currently visible instance
if (!isVisible()) {
return;
}

int sortColumn = static_cast<int>(m_pSortColumn->get());
Qt::SortOrder sortOrder = m_pSortOrder->get() ? Qt::DescendingOrder : Qt::AscendingOrder;

Expand Down

0 comments on commit 8f94fae

Please sign in to comment.