Fixed multiple inclusion of SPICE libraries

This commit is contained in:
Vadim Kuznetzov 2016-08-27 18:13:28 +03:00
parent a7bac77b3e
commit 2c3488dfac

View File

@ -133,11 +133,16 @@ void AbstractSpiceKernel::startNetlist(QTextStream &stream, bool xyce)
QString s;
// Include Directives
QStringList incls;
for(Component *pc = Sch->DocComps.first(); pc != 0; pc = Sch->DocComps.next()) {
if ((pc->SpiceModel==".INCLUDE")||
(pc->Model=="SpLib")) {
s = pc->getSpiceModel();
stream<<s;
if (!incls.contains(s)) {
// prevent multiple libraries inclusion
incls.append(s);
stream<<s;
}
}
}