Have the interface list unsorted by default.
authorGuy Harris <guy@alum.mit.edu>
Sat, 27 Feb 2016 02:51:32 +0000 (18:51 -0800)
committerGuy Harris <guy@alum.mit.edu>
Sat, 27 Feb 2016 02:52:00 +0000 (02:52 +0000)
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>
ui/qt/capture_interfaces_dialog.cpp

index d0c6e5a57040a75cbc7ab733f814173cf89527fd..1dd5e32ec5e982acb9cd02249e9146683809d624 100644 (file)
@@ -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_);