From 62f7cb881d5a25a9b07fdf8e83fa4c7a1586d8ac Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Mon, 26 Aug 2024 20:17:12 +0300 Subject: [PATCH 1/2] Fix enabled data files pairs --- qucs/dialogs/importdialog.cpp | 21 +++++---------------- qucs/dialogs/importdialog.h | 2 +- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/qucs/dialogs/importdialog.cpp b/qucs/dialogs/importdialog.cpp index 9628a716..1e0923a4 100644 --- a/qucs/dialogs/importdialog.cpp +++ b/qucs/dialogs/importdialog.cpp @@ -290,26 +290,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) { @@ -441,7 +430,7 @@ void ImportDialog::slotValidateOutput() default: break; } - slotType(); + slotType(OutType->currentIndex()); } diff --git a/qucs/dialogs/importdialog.h b/qucs/dialogs/importdialog.h index c5ff8b91..3f408d3f 100644 --- a/qucs/dialogs/importdialog.h +++ b/qucs/dialogs/importdialog.h @@ -49,7 +49,7 @@ private slots: void slotAbort(); void slotBrowse(); void slotSaveBrowse(); - void slotType(); + void slotType(int index); void slotValidateInput(); void slotValidateOutput(); From cd03a03177598e0de8f1e43a042d08613776912f Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Mon, 26 Aug 2024 20:22:41 +0300 Subject: [PATCH 2/2] Always convert whole dataset to sNp --- qucs/dialogs/importdialog.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/qucs/dialogs/importdialog.cpp b/qucs/dialogs/importdialog.cpp index 1e0923a4..7646b17a 100644 --- a/qucs/dialogs/importdialog.cpp +++ b/qucs/dialogs/importdialog.cpp @@ -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";