Browse Source

give preference to mc_reload when reloading the circuit

pre-master-46
Holger Vogt 8 years ago
parent
commit
cebb83eec1
  1. 13
      src/frontend/inp.c

13
src/frontend/inp.c

@ -467,18 +467,19 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
} }
/* called with *fp == NULL and not intfile: we want to reload circuit from mc_deck */ /* called with *fp == NULL and not intfile: we want to reload circuit from mc_deck */
else { else {
/* re-load input deck from the current circuit structure */
if (ft_curckt && ft_curckt->ci_mcdeck) {
deck = inp_deckcopy(ft_curckt->ci_mcdeck);
expr_w_temper = TRUE;
}
/* re-load deck due to command 'reset' via function inp_source_recent() */ /* re-load deck due to command 'reset' via function inp_source_recent() */
else if (mc_reload) {
if (mc_reload) {
deck = inp_deckcopy(mc_deck); deck = inp_deckcopy(mc_deck);
expr_w_temper = TRUE; expr_w_temper = TRUE;
mc_reload = FALSE; mc_reload = FALSE;
fprintf(stdout, "Reset re-loads circuit %s\n", mc_deck->line); fprintf(stdout, "Reset re-loads circuit %s\n", mc_deck->line);
} }
/* re-load input deck from the current circuit structure */
else if (ft_curckt && ft_curckt->ci_mcdeck) {
deck = inp_deckcopy(ft_curckt->ci_mcdeck);
expr_w_temper = TRUE;
}
/* no circuit available, should not happen */ /* no circuit available, should not happen */
else { else {
fprintf(stderr, "Error: No circuit loaded, cannot copy internally using mc_source\n"); fprintf(stderr, "Error: No circuit loaded, cannot copy internally using mc_source\n");

Loading…
Cancel
Save