Removed bools forwarding at AbstractSpiceKernel::createSubNetlsit()

This commit is contained in:
Vadim Kuznetzov 2016-04-05 09:26:11 +03:00
parent 4eda84deda
commit 97b944f3d2
4 changed files with 7 additions and 10 deletions

View File

@ -507,10 +507,7 @@ void LibraryDialog::slotSave()
"Check these components: %2 \n")
.arg(Doc->DocName).arg(err_lst.join("; ")));
}
if ((QucsSettings.DefaultSimulator == spicecompat::simXyceSer)||
(QucsSettings.DefaultSimulator == spicecompat::simXycePar))
kern->createSubNetlsit(ts,true);
else kern->createSubNetlsit(ts,false);
kern->createSubNetlsit(ts);
intoStream(Stream, tmp, "Spice");
delete kern;
}

View File

@ -185,7 +185,7 @@ void AbstractSpiceKernel::createNetlist(QTextStream&, int ,QStringList&,
* \param xyce Default is false. Should be set in true if netlist is
* prepared for Xyce simulator. For Ngspice should be false.
*/
void AbstractSpiceKernel::createSubNetlsit(QTextStream &stream, bool xyce)
void AbstractSpiceKernel::createSubNetlsit(QTextStream &stream)
{
QString header;
QString f = misc::properFileName(Sch->DocName);
@ -223,6 +223,9 @@ void AbstractSpiceKernel::createSubNetlsit(QTextStream &stream, bool xyce)
header += "\n";
stream<<header;
bool xyce = false;
if ((QucsSettings.DefaultSimulator == spicecompat::simXyceSer)||
(QucsSettings.DefaultSimulator == spicecompat::simXycePar)) xyce = true;
startNetlist(stream,xyce);
stream<<".ENDS\n";
}

View File

@ -63,7 +63,7 @@ public:
~AbstractSpiceKernel();
bool checkSchematic(QStringList &incompat);
virtual void createSubNetlsit(QTextStream& stream, bool xyce = false);
virtual void createSubNetlsit(QTextStream& stream);
void parseNgSpiceSimOutput(QString ngspice_file,
QList< QList<double> > &sim_points,

View File

@ -1796,10 +1796,7 @@ bool Schematic::createSubNetlist(QTextStream *stream, int& countInit,
ErrText->insertPlainText(s);
return false;
}
if ((QucsSettings.DefaultSimulator == spicecompat::simXyceSer)||
(QucsSettings.DefaultSimulator == spicecompat::simXycePar))
kern->createSubNetlsit(*stream,true);
else kern->createSubNetlsit(*stream,false);
kern->createSubNetlsit(*stream);
delete kern;
}