Don’t adjust time column widths in cf_open

The time column widths should not be adjusted in cf_open() because
we don’t have any packets yet and Qt resizeColumnToContents() will
not adjust any widths but emits a sectionResized() with invalid or
default values (new_width seems to always be 32).  This will in some
cases (when start capturing packets) give wrong width values which
is later stored in the recent file, and the time columns may end up
narrow the next time the recent file is read.

This fix is related to the column with issues previously compensated
for in PacketList::sectionResized() (g4980d505).

Change-Id: Id3b49069fe5d2b55d608cc7a6d32fe7851369bf9
Reviewed-on: https://code.wireshark.org/review/13712
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Stig Bjørlykke 2016-02-04 22:00:53 +01:00 committed by Anders Broman
parent cc679ca5ce
commit 651d860d90
1 changed files with 0 additions and 3 deletions

3
file.c
View File

@ -358,9 +358,6 @@ cf_open(capture_file *cf, const char *fname, unsigned int type, gboolean is_temp
cf->prev_cap = NULL;
cf->cum_bytes = 0;
/* Adjust timestamp precision if auto is selected, col width will be adjusted */
cf_timestamp_auto_precision(cf);
/* XXX needed ? */
packet_list_queue_draw();
cf_callback_invoke(cf_cb_file_opened, cf);