From 71ec50e2f85ef84f3741330930c01edbb228bc47 Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Wed, 13 Mar 2024 13:02:59 +0300 Subject: [PATCH] Fix save netlist from CLI --- qucs/extsimkernels/ngspice.cpp | 20 +++++++++++--------- qucs/main.cpp | 3 +++ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/qucs/extsimkernels/ngspice.cpp b/qucs/extsimkernels/ngspice.cpp index 450a9051..a9a63287 100644 --- a/qucs/extsimkernels/ngspice.cpp +++ b/qucs/extsimkernels/ngspice.cpp @@ -123,15 +123,17 @@ void Ngspice::createNetlist(QTextStream &stream, int , stream << "\n.control\n\n"; //execute simulations - if (!QucsMain->ProjName.isEmpty()) { - // always load osdi from the project directory - QStringList osdi_ext; - osdi_ext<<"*.osdi"; - QStringList osdi_files = QucsSettings.QucsWorkDir.entryList(osdi_ext,QDir::Files); - for(const auto &file : osdi_files) { - QString abs_file = QucsSettings.QucsWorkDir.absolutePath() + - QDir::separator() + file; - stream<ProjName.isEmpty()) { + // always load osdi from the project directory + QStringList osdi_ext; + osdi_ext<<"*.osdi"; + QStringList osdi_files = QucsSettings.QucsWorkDir.entryList(osdi_ext,QDir::Files); + for(const auto &file : osdi_files) { + QString abs_file = QucsSettings.QucsWorkDir.absolutePath() + + QDir::separator() + file; + stream<