diff options
author | Gerald Combs <gerald@zing.org> | 2015-07-12 12:56:05 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-07-12 19:59:58 +0000 |
commit | 39a2d9468b019c5c7de4b21eb497772b1336c36f (patch) | |
tree | a530163ad8690453893a1e2383348b3ebd22a6f6 /ui/qt/packet_list_model.cpp | |
parent | a17bb6c3508cea056113f4a54ebcaf44312e50aa (diff) | |
download | wireshark-39a2d9468b019c5c7de4b21eb497772b1336c36f.tar.gz |
Fixup packet list selection.
Be less aggressive about resetting the packet list model so that we
retain our selection when (un)coloring packets or rebuilding columns.
Correctly enable a colorization menu item while we're here.
Change-Id: I8d1c8f26dbb8a814b8344b609695b77632006e4b
Reviewed-on: https://code.wireshark.org/review/9608
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/packet_list_model.cpp')
-rw-r--r-- | ui/qt/packet_list_model.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/qt/packet_list_model.cpp b/ui/qt/packet_list_model.cpp index 80563be940..8a3e443d52 100644 --- a/ui/qt/packet_list_model.cpp +++ b/ui/qt/packet_list_model.cpp @@ -110,22 +110,21 @@ void PacketListModel::clear() { void PacketListModel::resetColumns() { - beginResetModel(); if (cap_file_) { PacketListRecord::resetColumns(&cap_file_->cinfo); } - endResetModel(); + dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1)); + headerDataChanged(Qt::Horizontal, 0, columnCount() - 1); } void PacketListModel::resetColorized() { PacketListRecord *record; - beginResetModel(); foreach (record, physical_rows_) { record->resetColorized(); } - endResetModel(); + dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1)); } void PacketListModel::setMonospaceFont(const QFont &mono_font, int row_height) |