diff --git a/ui/qt/models/packet_list_model.cpp b/ui/qt/models/packet_list_model.cpp index 23c36f0f9a..9d1396f90e 100644 --- a/ui/qt/models/packet_list_model.cpp +++ b/ui/qt/models/packet_list_model.cpp @@ -109,7 +109,6 @@ PacketListModel::~PacketListModel() void PacketListModel::setCaptureFile(capture_file *cf) { cap_file_ = cf; - resetColumns(); } // Packet list records have no children (for now, at least). diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index d20d801a64..71a68a7a76 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -1059,7 +1059,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() ? + resetColumns(); } // Column widths should @@ -1440,6 +1440,8 @@ void PacketList::deleteAllPacketComments() void PacketList::setCaptureFile(capture_file *cf) { cap_file_ = cf; + packet_list_model_->setCaptureFile(cf); + packet_list_header_->setCaptureFile(cf); if (cf) { if (columns_changed_) { columnsChanged(); @@ -1449,8 +1451,6 @@ void PacketList::setCaptureFile(capture_file *cf) setColumnVisibility(); } } - packet_list_model_->setCaptureFile(cf); - packet_list_header_->setCaptureFile(cf); create_near_overlay_ = true; sortByColumn(-1, Qt::AscendingOrder); } diff --git a/ui/qt/widgets/packet_list_header.cpp b/ui/qt/widgets/packet_list_header.cpp index 251fc4e44c..e08469e2d7 100644 --- a/ui/qt/widgets/packet_list_header.cpp +++ b/ui/qt/widgets/packet_list_header.cpp @@ -36,7 +36,7 @@ PacketListHeader::PacketListHeader(Qt::Orientation orientation, capture_file * c { setAcceptDrops(true); setSectionsMovable(true); - setStretchLastSection(true); + setStretchLastSection(false); setDefaultAlignment(Qt::AlignLeft|Qt::AlignVCenter); }