From 5c4be8313b761e34325b417099353c20fd715c4d Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 14 Feb 2025 14:40:56 +0100 Subject: [PATCH] better xctx->save_netlist_type setting when navigating in the hierarchy (of LCC schematics specifically) --- src/save.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/save.c b/src/save.c index bee040f1..b549c589 100644 --- a/src/save.c +++ b/src/save.c @@ -3545,7 +3545,7 @@ int load_schematic(int load_symbols, const char *fname, int reset_undo, int aler } len = strlen(name); if(!strcmp(name + len - 4, ".sym")) { - xctx->save_netlist_type = xctx->netlist_type; + if(xctx->netlist_type != CAD_SYMBOL_ATTRS) xctx->save_netlist_type = xctx->netlist_type; xctx->netlist_type = CAD_SYMBOL_ATTRS; set_tcl_netlist_type(); xctx->loaded_symbol = 1; @@ -3564,7 +3564,7 @@ int load_schematic(int load_symbols, const char *fname, int reset_undo, int aler if(reset_undo) { tclvareval("is_xschem_file {", xctx->sch[xctx->currsch], "}", NULL); if(!strcmp(tclresult(), "SYMBOL") || xctx->instances == 0) { - xctx->save_netlist_type = xctx->netlist_type; + if(xctx->netlist_type != CAD_SYMBOL_ATTRS) xctx->save_netlist_type = xctx->netlist_type; xctx->netlist_type = CAD_SYMBOL_ATTRS; set_tcl_netlist_type(); xctx->loaded_symbol = 1; @@ -5217,7 +5217,7 @@ int descend_symbol(void) } my_free(_ALLOC_ID_, &sympath); } - xctx->save_netlist_type = save_netlist_type; + if(save_netlist_type != CAD_SYMBOL_ATTRS) xctx->save_netlist_type = save_netlist_type; xctx->loaded_symbol = 1; xctx->netlist_type = CAD_SYMBOL_ATTRS; set_tcl_netlist_type();