Skip to content

Commit

Permalink
Fix Spk Dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
be1 committed Jan 6, 2025
1 parent 217f438 commit 532ed2e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions speakerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ SpeakerDialog::~SpeakerDialog()

void SpeakerDialog::onVendorTextChanged(QString text)
{
if (text.isNull() || text.isEmpty())
if (text.isEmpty())
ui->speakerButtonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
else if (!ui->modelLineEdit->text().isNull() && !ui->modelLineEdit->text().isEmpty())
else if (!ui->modelLineEdit->text().isEmpty())
ui->speakerButtonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
}

void SpeakerDialog::onModelTextChanged(QString text)
{
if (text.isNull() || text.isEmpty())
if (text.isEmpty())
ui->speakerButtonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
else if (!ui->vendorLineEdit->text().isNull() && !ui->vendorLineEdit->text().isEmpty())
else if (!ui->vendorLineEdit->text().isEmpty())
ui->speakerButtonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
}

Expand Down Expand Up @@ -103,7 +103,7 @@ void SpeakerDialog::onSpeakerAccepted()
spk.computeEmptyParams();


if (oldVendor.isNull() || oldModel.isNull()) {
if (oldVendor.isEmpty() || oldModel.isEmpty()) {
SpeakerDb::insertOrReplace(vendor, model, spk);
} else {
SpeakerDb::insertOrReplace(oldVendor, oldModel, spk);
Expand Down

0 comments on commit 532ed2e

Please sign in to comment.