diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-02-04 15:05:39 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-02-05 05:33:22 +0000 |
commit | 4c144c5d8c4c3f289a8b89a19bb9843cf9584d0e (patch) | |
tree | 25e693e990ddab43017b0d1e3b7232dc25eecc8a /ui/qt | |
parent | 179b733d375f65e482afb84cb54c24d1c6466d21 (diff) |
Qt: Reset columns before auto resize time columns
When changing timestamp format, timestamp precision and display seconds
with hours and minutes we must reset columns before auto resizing the
time columns to get the size of the new column values.
Without this we will resize to the length of the preference we are
changing from, which is not what we want.
Change-Id: If7081bf0b9b6f6974232cea0b3fe0186c904f2a2
Reviewed-on: https://code.wireshark.org/review/13711
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>
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/main_window_slots.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index a12649910f..12f52cf586 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -2177,13 +2177,14 @@ void MainWindow::setTimestampFormat(QAction *action) if (recent.gui_time_format != tsf) { timestamp_set_type(tsf); recent.gui_time_format = tsf; + + if (packet_list_) { + packet_list_->resetColumns(); + } if (capture_file_.capFile()) { /* This call adjusts column width */ cf_timestamp_auto_precision(capture_file_.capFile()); } - if (packet_list_) { - packet_list_->resetColumns(); - } } } @@ -2199,13 +2200,14 @@ void MainWindow::setTimestampPrecision(QAction *action) /* the actual precision will be set in packet_list_queue_draw() below */ timestamp_set_precision(tsp); recent.gui_time_precision = tsp; + + if (packet_list_) { + packet_list_->resetColumns(); + } if (capture_file_.capFile()) { /* This call adjusts column width */ cf_timestamp_auto_precision(capture_file_.capFile()); } - if (packet_list_) { - packet_list_->resetColumns(); - } } } @@ -2218,13 +2220,13 @@ void MainWindow::on_actionViewTimeDisplaySecondsWithHoursAndMinutes_triggered(bo } timestamp_set_seconds_type(recent.gui_seconds_format); + if (packet_list_) { + packet_list_->resetColumns(); + } if (capture_file_.capFile()) { /* This call adjusts column width */ cf_timestamp_auto_precision(capture_file_.capFile()); } - if (packet_list_) { - packet_list_->resetColumns(); - } } void MainWindow::on_actionViewEditResolvedName_triggered() |