Qt: Fix the filter expression toolbar layout.
authorGerald Combs <gerald@wireshark.org>
Wed, 14 Feb 2018 01:08:14 +0000 (17:08 -0800)
committerAnders Broman <a.broman58@gmail.com>
Wed, 14 Feb 2018 05:32:50 +0000 (05:32 +0000)
Take a hint from the QToolButton sources and update the filter
expression toolbar using updateGeometry instead of adjustSize. This
appears to do the layout updates and other changes required to draw the
dropdown in the correct place.

Bug: 14121
Change-Id: I45d5a1173703f9c16d89841a57f651935da43d92
Reviewed-on: https://code.wireshark.org/review/25784
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
ui/qt/main_window_slots.cpp

index 26abffd4ff9159952690f735ab940c0eced14ef3..67bac429ce76e66581980411debf55d234232caa 100644 (file)
@@ -1028,7 +1028,9 @@ void MainWindow::filterExpressionsChanged()
     filter_expression_iterate_expressions(filter_expression_add_action, &data);
 
     if (data.actions_added) {
-        main_ui_->displayFilterToolBar->adjustSize();
+        // QToolButton calls updateGeometry+update all over the place.
+        // updateGeometry should be sufficient here.
+        main_ui_->displayFilterToolBar->updateGeometry();
     }
 }