diff options
-rw-r--r-- | ui/qt/packet_list.cpp | 4 | ||||
-rw-r--r-- | ui/qt/packet_list_model.cpp | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index 492f65cffc..4e5bd43b72 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -636,10 +636,9 @@ void PacketList::columnsChanged() prefs.num_cols = g_list_length(prefs.col_list); col_cleanup(&cap_file_->cinfo); build_column_format_array(&cap_file_->cinfo, prefs.num_cols, FALSE); - packet_list_model_->recreateVisibleRows(); // Calls PacketListRecord::resetColumns setColumnVisibility(); create_far_overlay_ = true; - redrawVisiblePackets(); + packet_list_model_->resetColumns(); } // Fields have changed, update custom columns @@ -648,6 +647,7 @@ void PacketList::fieldsChanged(capture_file *cf) prefs.num_cols = g_list_length(prefs.col_list); col_cleanup(&cf->cinfo); build_column_format_array(&cf->cinfo, prefs.num_cols, FALSE); + // call packet_list_model_->resetColumns() ? } // Column widths should diff --git a/ui/qt/packet_list_model.cpp b/ui/qt/packet_list_model.cpp index 5b10900158..404dda58ab 100644 --- a/ui/qt/packet_list_model.cpp +++ b/ui/qt/packet_list_model.cpp @@ -93,11 +93,8 @@ guint PacketListModel::recreateVisibleRows() beginResetModel(); visible_rows_.clear(); number_to_row_.clear(); - if (cap_file_) { - PacketListRecord::resetColumns(&cap_file_->cinfo); - } - endResetModel(); + beginInsertRows(QModelIndex(), pos, pos); foreach (record, physical_rows_) { if (record->frameData()->flags.passed_dfilter || record->frameData()->flags.ref_time) { |