diff --git a/src/scheduler.c b/src/scheduler.c index dccb92b6..5084a1ad 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1119,7 +1119,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg ": UNSAVED data: want to exit?\""); } if(force || !xctx->modified || !strcmp(tclresult(), "ok")) { - if(has_x) tcleval("store_geom . [xschem get schname]"); + if(has_x) tcleval("store_geom [xschem get toplevel] [xschem get schname]"); swap_windows(0); set_modify(0); /* set modified status to 0 to avoid another confirm in following line */ new_schematic("destroy", xctx->current_win_path, NULL, 0); @@ -1138,7 +1138,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg tcleval(s); } else { - if(has_x) tcleval("store_geom . [xschem get schname]"); + if(has_x) tcleval("store_geom [xschem get toplevel] [xschem get schname]"); clear_schematic(0, 0); } } @@ -1155,7 +1155,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg ": UNSAVED data: want to exit?\""); } if(!has_x || force || !xctx->modified || !strcmp(tclresult(), "ok")) { - if(has_x) tcleval("store_geom . [xschem get schname]"); + if(has_x) tcleval("store_geom [xschem get toplevel] [xschem get schname]"); swap_tabs(); set_modify(0); new_schematic("destroy", xctx->current_win_path, NULL, 1); @@ -1173,7 +1173,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg tcleval(s); } else { - if(has_x) tcleval("store_geom . [xschem get schname]"); + if(has_x) tcleval("store_geom [xschem get toplevel] [xschem get schname]"); clear_schematic(0, 0); } } @@ -1181,8 +1181,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg } } else { if(force) set_modify(0); /* avoid ask to save downstream */ - if(has_x) tclvareval("store_geom ", xctx->top_path[0] ? xctx->top_path : ".", - " [xschem get schname]", NULL); + if(has_x) tcleval("store_geom [xschem get toplevel] [xschem get schname]"); new_schematic("destroy", xctx->current_win_path, NULL, 1); } Tcl_SetResult(interp, my_itoa(get_window_count()), TCL_VOLATILE); @@ -3119,7 +3118,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(force || !has_x || !xctx->modified || save(1, 0) != -1 ) { /* save(1)==-1 --> user cancel */ char win_path[WINDOW_PATH_SIZE]; int skip = 0; - if(has_x) tcleval("store_geom . [xschem get schname]"); + if(has_x) tcleval("store_geom [xschem get toplevel] [xschem get schname]"); dbg(1, "scheduler(): load: filename=%s\n", f); my_strncpy(f, abs_sym_path(f, ""), S(f)); if(!force && f[0] && check_loaded(f, win_path) &&