forked from osmocom/wireshark
Qt: Fixed more column issues when changing profile.
When changing profile without a loaded capture file we have to rebuild cap_file_->cinfo when a capture is loaded. Bug: 11493 Change-Id: I9b561a360236056c104cfdb478b855fa550325e2 Reviewed-on: https://code.wireshark.org/review/12068 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
3438fe2dd9
commit
7324555c1f
|
@ -249,7 +249,8 @@ PacketList::PacketList(QWidget *parent) :
|
|||
create_far_overlay_(true),
|
||||
capture_in_progress_(false),
|
||||
tail_timer_id_(0),
|
||||
rows_inserted_(false)
|
||||
rows_inserted_(false),
|
||||
columns_changed_(false)
|
||||
{
|
||||
QMenu *main_menu_item, *submenu;
|
||||
QAction *action;
|
||||
|
@ -635,7 +636,10 @@ void PacketList::redrawVisiblePackets() {
|
|||
// prefs.col_list has changed.
|
||||
void PacketList::columnsChanged()
|
||||
{
|
||||
if (!cap_file_) return;
|
||||
if (!cap_file_) {
|
||||
columns_changed_ = true;
|
||||
return;
|
||||
}
|
||||
|
||||
prefs.num_cols = g_list_length(prefs.col_list);
|
||||
col_cleanup(&cap_file_->cinfo);
|
||||
|
@ -643,6 +647,7 @@ void PacketList::columnsChanged()
|
|||
setColumnVisibility();
|
||||
create_far_overlay_ = true;
|
||||
packet_list_model_->resetColumns();
|
||||
columns_changed_ = false;
|
||||
}
|
||||
|
||||
// Fields have changed, update custom columns
|
||||
|
@ -977,6 +982,9 @@ void PacketList::setCaptureFile(capture_file *cf)
|
|||
header()->restoreState(column_state_);
|
||||
}
|
||||
cap_file_ = cf;
|
||||
if (cap_file_ && columns_changed_) {
|
||||
columnsChanged();
|
||||
}
|
||||
packet_list_model_->setCaptureFile(cf);
|
||||
create_near_overlay_ = true;
|
||||
}
|
||||
|
|
|
@ -116,6 +116,7 @@ private:
|
|||
int tail_timer_id_;
|
||||
bool tail_at_end_;
|
||||
bool rows_inserted_;
|
||||
bool columns_changed_;
|
||||
|
||||
void setFrameReftime(gboolean set, frame_data *fdata);
|
||||
void setColumnVisibility();
|
||||
|
|
Loading…
Reference in New Issue