From 59fccdee148cfecd6787ba3f318bc0b0faf66e68 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Wed, 17 Nov 2021 11:34:58 +0100 Subject: [PATCH] proc new_window remove file normalize as it messes up symlinks --- src/scheduler.c | 3 ++- src/xschem.tcl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scheduler.c b/src/scheduler.c index b9eb8a2d..2b92ba4f 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1361,9 +1361,10 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg cmd_found = 1; tcleval("catch { ngspice::resetdata }"); tcleval("load_file_dialog {Load Schematic} .sch.sym INITIALLOADDIR"); - my_snprintf(fullname, S(fullname),"%s", abs_sym_path(tclresult(), "")); + my_snprintf(fullname, S(fullname),"%s", abs_sym_path(rel_sym_path(tclresult()), "")); if( fullname[0] ) { Tcl_VarEval(interp, "new_window create ", fullname, NULL); + Tcl_VarEval(interp, "update_recent_file {", fullname, "}", NULL); } } diff --git a/src/xschem.tcl b/src/xschem.tcl index 042580b0..744e14b0 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -3470,7 +3470,7 @@ proc new_window {what {filename {}} {path {-}}} { build_widgets $path pack_widgets $path ;# also does set_bindings $path.drw update - xschem new_schematic create $path $path.drw [file normalize $filename] + xschem new_schematic create $path $path.drw $filename save_ctx $path.drw return $path } elseif { $what eq {destroy}} {