aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-02-26 18:51:32 -0800
committerGuy Harris <guy@alum.mit.edu>2016-02-27 02:52:00 +0000
commit4d22c44f65bba92fb4922344e48c8b3f538022f6 (patch)
tree70642c5152a88516c77999d14246df9c5fc4be39 /ui/qt
parentcdb7a7a25dfc87a1b12c43d134cab43a612427cb (diff)
Have the interface list unsorted by default.
That way, they initially show up in pcap's order, putting the preferred interface at the top. If the user wants to sort them by some column, the user can click on the column in question. Change-Id: I30ac38519c42ae5317d99fdd0a079b030e6af308 Reviewed-on: https://code.wireshark.org/review/14194 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt')
-rw-r--r--ui/qt/capture_interfaces_dialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp
index d0c6e5a570..1dd5e32ec5 100644
--- a/ui/qt/capture_interfaces_dialog.cpp
+++ b/ui/qt/capture_interfaces_dialog.cpp
@@ -128,7 +128,9 @@ CaptureInterfacesDialog::CaptureInterfacesDialog(QWidget *parent) :
start_bt_->setEnabled((global_capture_opts.num_selected > 0)? true: false);
connect(start_bt_, SIGNAL(clicked(bool)), this, SLOT(start_button_clicked()));
- ui->interfaceTree->sortByColumn(col_interface_, Qt::AscendingOrder);
+ // Start out with the list *not* sorted, so they show up in the order
+ // in which they were provided
+ ui->interfaceTree->sortByColumn(-1, Qt::AscendingOrder);
ui->interfaceTree->setItemDelegateForColumn(col_interface_, &interface_item_delegate_);
ui->interfaceTree->setItemDelegateForColumn(col_traffic_, new SparkLineDelegate());
ui->interfaceTree->setItemDelegateForColumn(col_link_, &interface_item_delegate_);