Skip to content

Commit

Permalink
Fixed list par.sweep; fixes #382
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3xdh committed Nov 23, 2023
1 parent 4db706b commit 661dc82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qucs/components/param_sweep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 661dc82

Please sign in to comment.