Qt: Only sort if there are actually lines to sort

Remove the sort for physical rows, if there are no rows to sort

Ping #18159
This commit is contained in:
Roland Knall 2022-06-26 12:57:48 +02:00
parent cc52ef4d12
commit 006d20db9e
1 changed files with 3 additions and 0 deletions

View File

@ -347,6 +347,9 @@ void PacketListModel::sort(int column, Qt::SortOrder order)
if (!cap_file_ || visible_rows_.count() < 1) return;
if (column < 0) return;
if (physical_rows_.count() < 1)
return;
sort_column_ = column;
text_sort_column_ = PacketListRecord::textColumn(column);
sort_order_ = order;