aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/alsoft-config/mainwindow.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/utils/alsoft-config/mainwindow.cpp b/utils/alsoft-config/mainwindow.cpp
index 8d5dfe02..e1212f2f 100644
--- a/utils/alsoft-config/mainwindow.cpp
+++ b/utils/alsoft-config/mainwindow.cpp
@@ -472,6 +472,7 @@ void MainWindow::showAboutPage()
QStringList MainWindow::collectHrtfs()
{
QStringList ret;
+ QStringList processed;
for(int i = 0;i < ui->hrtfFileList->count();i++)
{
@@ -481,13 +482,17 @@ QStringList MainWindow::collectHrtfs()
{
if(!fname.endsWith(".mhr", Qt::CaseInsensitive))
continue;
+ QString fullname = dir.absoluteFilePath(fname);
+ if(processed.contains(fullname))
+ continue;
+ processed.push_back(fullname);
QString name = fname.left(fname.length()-4);
if(!ret.contains(name))
ret.push_back(name);
else
{
- size_t i = 1;
+ size_t i = 2;
do {
QString s = name+" #"+QString::number(i);
if(!ret.contains(s))
@@ -512,13 +517,17 @@ QStringList MainWindow::collectHrtfs()
{
if(!fname.endsWith(".mhr", Qt::CaseInsensitive))
continue;
+ QString fullname = dir.absoluteFilePath(fname);
+ if(processed.contains(fullname))
+ continue;
+ processed.push_back(fullname);
QString name = fname.left(fname.length()-4);
if(!ret.contains(name))
ret.push_back(name);
else
{
- size_t i = 1;
+ size_t i = 2;
do {
QString s = name+" #"+QString::number(i);
if(!ret.contains(s))