dctran.c, runcoms2.c: shared ngspice: remove plot data upon 'bg_halt' and 'remcirc'
This commit is contained in:
parent
b33f374d22
commit
3dff06228e
|
|
@ -13,6 +13,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
|
|||
#include "ngspice/ftedev.h"
|
||||
#include "ngspice/ftedebug.h"
|
||||
#include "ngspice/dvec.h"
|
||||
#include "ngspice/trandefs.h"
|
||||
|
||||
#include "circuits.h"
|
||||
#include "runcoms2.h"
|
||||
|
|
@ -21,6 +22,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
|
|||
#include "breakp2.h"
|
||||
#include "plotting/graf.h"
|
||||
#include "spiceif.h"
|
||||
#include "outitf.h"
|
||||
|
||||
#include "ngspice/inpdefs.h"
|
||||
|
||||
|
|
@ -198,6 +200,15 @@ com_remcirc(wordlist *wl)
|
|||
struct line *dd; /*in: the spice deck */
|
||||
struct circ *p, *prev = NULL;
|
||||
|
||||
#ifdef SHARED_MODULE
|
||||
/* This may happen only with shared ngspice during transient analysis,
|
||||
if simulation is stopped with 'bg_halt'
|
||||
and then circuit shall be removed prematurely. */
|
||||
TRANan *job = (TRANan *) ft_curckt->ci_ckt->CKTcurJob;
|
||||
if ((job->JOBtype == 4) && (job->TRANplot))
|
||||
SPfrontEnd->OUTendPlot (job->TRANplot);
|
||||
#endif
|
||||
|
||||
NG_IGNORE(wl);
|
||||
|
||||
if (ft_curckt == NULL) {
|
||||
|
|
|
|||
|
|
@ -486,6 +486,7 @@ DCtran(CKTcircuit *ckt,
|
|||
ckt->CKTtime, ckt->CKTfinalTime, ckt->CKTminBreak);
|
||||
#endif
|
||||
SPfrontEnd->OUTendPlot (job->TRANplot);
|
||||
job->TRANplot = NULL;
|
||||
UPDATE_STATS(0);
|
||||
#ifdef WANT_SENSE2
|
||||
if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN)){
|
||||
|
|
|
|||
Loading…
Reference in New Issue