Skip to content

Commit

Permalink
Merge pull request #916 from ra3xdh/910_fix
Browse files Browse the repository at this point in the history
Fix Qucsconv GUI
  • Loading branch information
ra3xdh committed Aug 26, 2024
2 parents c4f1495 + cd03a03 commit 5ad439a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
23 changes: 5 additions & 18 deletions qucs/dialogs/importdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ void ImportDialog::slotImport()
break;
case 1:
CommandLine << "touchstone";
if (!OutputData->currentText().isEmpty())
CommandLine << "-d" << OutputData->currentText();
break;
case 2:
CommandLine << "csv";
Expand Down Expand Up @@ -290,26 +288,15 @@ void ImportDialog::slotImport()
}

// ------------------------------------------------------------------------
void ImportDialog::slotType()
void ImportDialog::slotType(int index)
{
auto index = OutType->currentIndex();
switch(index) {
case 0:
case 3:
case 4:
case 5:
OutputData->setEnabled(false);
OutputLabel->setEnabled(false);
break;
case 1:
case 2:
//auto index = OutType->currentIndex();
if (index == 2) {
OutputData->setEnabled(true);
OutputLabel->setEnabled(true);
break;
default:
} else {
OutputData->setEnabled(false);
OutputLabel->setEnabled(false);
break;
}

if (index == 3) {
Expand Down Expand Up @@ -441,7 +428,7 @@ void ImportDialog::slotValidateOutput()
default:
break;
}
slotType();
slotType(OutType->currentIndex());
}


Expand Down
2 changes: 1 addition & 1 deletion qucs/dialogs/importdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private slots:
void slotAbort();
void slotBrowse();
void slotSaveBrowse();
void slotType();
void slotType(int index);
void slotValidateInput();
void slotValidateOutput();

Expand Down

0 comments on commit 5ad439a

Please sign in to comment.