From 11acbfebf7e1b49c5a420dcfd5505ac4c70b46ba Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 27 Feb 2016 22:12:53 -0800 Subject: Hide backend list items for backends that aren't available --- utils/alsoft-config/mainwindow.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'utils') diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp index 30168773..127350f1 100644 --- a/utils/alsoft-config/mainwindow.cpp +++ b/utils/alsoft-config/mainwindow.cpp @@ -313,6 +313,17 @@ MainWindow::MainWindow(QWidget *parent) : ui->backendListWidget->setCurrentRow(0); ui->tabWidget->setCurrentIndex(0); + for(int i = 1;i < ui->backendListWidget->count();i++) + ui->backendListWidget->setRowHidden(i, true); + for(int i = 0;backendList[i].backend_name[0];i++) + { + QList items = ui->backendListWidget->findItems( + backendList[i].full_string, Qt::MatchFixedString + ); + foreach(const QListWidgetItem *item, items) + ui->backendListWidget->setItemHidden(item, false); + } + loadConfig(getDefaultConfigName()); } -- cgit v1.2.3