forked from osmocom/wireshark
Qt: Restore column visibility when loading packets
Always restore column visibility when loading packets to avoid some situations where the column hidden state was incorrect. This fixes the following scenario: - Apply a column and hide it using the column popup menu - Apply another column and remove it using the column popup menu - Close and reopen the capture file - Observe the hidden column is shown, but with wrong width Change-Id: I00531907b2383c6605a2d62e8243092906037d0c Reviewed-on: https://code.wireshark.org/review/29516 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
7ce18dc465
commit
7d7175a130
|
@ -1198,13 +1198,15 @@ void PacketList::deleteAllPacketComments()
|
||||||
|
|
||||||
void PacketList::setCaptureFile(capture_file *cf)
|
void PacketList::setCaptureFile(capture_file *cf)
|
||||||
{
|
{
|
||||||
if (cf) {
|
|
||||||
// We're opening. Restore our column widths.
|
|
||||||
header()->restoreState(column_state_);
|
|
||||||
}
|
|
||||||
cap_file_ = cf;
|
cap_file_ = cf;
|
||||||
if (cap_file_ && columns_changed_) {
|
if (cf) {
|
||||||
|
if (columns_changed_) {
|
||||||
columnsChanged();
|
columnsChanged();
|
||||||
|
} else {
|
||||||
|
// Restore columns widths and visibility.
|
||||||
|
header()->restoreState(column_state_);
|
||||||
|
setColumnVisibility();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
packet_list_model_->setCaptureFile(cf);
|
packet_list_model_->setCaptureFile(cf);
|
||||||
create_near_overlay_ = true;
|
create_near_overlay_ = true;
|
||||||
|
|
Loading…
Reference in New Issue