aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpdevpropdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmidiplayer-desktop/qmpdevpropdialog.cpp')
-rw-r--r--qmidiplayer-desktop/qmpdevpropdialog.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/qmidiplayer-desktop/qmpdevpropdialog.cpp b/qmidiplayer-desktop/qmpdevpropdialog.cpp
index 0159a63..150f54b 100644
--- a/qmidiplayer-desktop/qmpdevpropdialog.cpp
+++ b/qmidiplayer-desktop/qmpdevpropdialog.cpp
@@ -73,7 +73,16 @@ void qmpDevPropDialog::setupRow(const QString&dn,const QString&din)
if(s==QString::fromStdString(ds)){conn=true;break;}
((QCheckBox*)ui->twProps->cellWidget(r,1))->setChecked(conn);
});
- if(dn.length())cb->setCurrentText(dn);
+ if(dn.length())
+ {
+ cb->setCurrentText(dn);
+ if(cb->currentText()!=dn)
+ {
+ cb->setEditable(true);
+ cb->setCurrentText(dn);
+ cb->setEnabled(false);
+ }
+ }
emit cb->currentTextChanged(cb->currentText());
connect(pb,&QPushButton::clicked,this,[this,lb,fw]{
lb->setText(QFileDialog::getOpenFileUrl(this,"Select Device Initialization File",QUrl()).path());