From 661dc82e4a237be2789f53d6b68300ca5da9165c Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Thu, 23 Nov 2023 20:19:04 +0300 Subject: [PATCH] Fixed list par.sweep; fixes #382 --- qucs/components/param_sweep.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qucs/components/param_sweep.cpp b/qucs/components/param_sweep.cpp index f7f60ae02..697006a7b 100644 --- a/qucs/components/param_sweep.cpp +++ b/qucs/components/param_sweep.cpp @@ -116,11 +116,11 @@ QString Param_Sweep::getNgspiceBeforeSim(QString sim, int lvl) s += QString("foreach %1_act ").arg(step_var); if((type == "list") || (type == "const")) { - QStringList List; - List = getProperty("Values")->Value.split(";"); - + QString list_str = getProperty("Values")->Value; + list_str.remove(0,1); // remove [ ] + list_str.chop(1); + QStringList List = list_str.split(";"); for(int i = 0; i < List.length(); i++) { - List[i].remove(QRegularExpression("[A-Z a-z [\\] s/' '//g]")); s += QString("%1 ").arg(List[i]); } } else {