aboutsummaryrefslogtreecommitdiffstats
path: root/utils/alsoft-config/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/alsoft-config/mainwindow.cpp')
-rw-r--r--utils/alsoft-config/mainwindow.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp
index f2db5c54..0047233f 100644
--- a/utils/alsoft-config/mainwindow.cpp
+++ b/utils/alsoft-config/mainwindow.cpp
@@ -96,6 +96,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->hrtfAddButton, SIGNAL(clicked()), this, SLOT(addHrtfFile()));
connect(ui->hrtfRemoveButton, SIGNAL(clicked()), this, SLOT(removeHrtfFile()));
+ connect(ui->hrtfFileList, SIGNAL(itemSelectionChanged()), this, SLOT(updateHrtfRemoveButton()));
ui->enabledBackendList->setContextMenuPolicy(Qt::CustomContextMenu);
connect(ui->enabledBackendList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showEnabledBackendMenu(QPoint)));
@@ -238,6 +239,7 @@ void MainWindow::loadConfig(const QString &fname)
hrtf_tables.begin(), std::mem_fun_ref(&QString::trimmed));
ui->hrtfFileList->clear();
ui->hrtfFileList->addItems(hrtf_tables);
+ updateHrtfRemoveButton();
ui->enabledBackendList->clear();
ui->disabledBackendList->clear();
@@ -495,6 +497,11 @@ void MainWindow::removeHrtfFile()
delete item;
}
+void MainWindow::updateHrtfRemoveButton()
+{
+ ui->hrtfRemoveButton->setEnabled(ui->hrtfFileList->selectedItems().size() != 0);
+}
+
void MainWindow::showEnabledBackendMenu(QPoint pt)
{
QMap<QAction*,QString> actionMap;