diff --git a/src/netlist.c b/src/netlist.c index 9c074bff..5a832c6f 100644 --- a/src/netlist.c +++ b/src/netlist.c @@ -1057,6 +1057,7 @@ int compare_schematics(const char *f) char current_sch[PATH_MAX]; int ret=0; /* ret==0 means no differences found */ + save(0); if(f == NULL) { tcleval("load_file_dialog {Schematic to compare with} .sch.sym INITIALLOADDIR"); if(tclresult()[0]) my_strncpy(xctx->sch_to_compare, tclresult(), S(xctx->sch_to_compare)); diff --git a/src/scheduler.c b/src/scheduler.c index 9a5b1d72..df7dc660 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -989,9 +989,12 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg else if(!strcmp(argv[2],"textlayer")) { Tcl_SetResult(interp, my_itoa(TEXTLAYER), TCL_VOLATILE); } + /* top_path="" for main window, ".x1", ".x2", ... for additional windows. + * always "" in tabbed interface */ else if(!strcmp(argv[2],"top_path")) { Tcl_SetResult(interp, xctx->top_path, TCL_VOLATILE); } + /* same as above but main window returned as "." */ else if(!strcmp(argv[2],"topwindow")) { char *top_path; top_path = xctx->top_path[0] ? xctx->top_path : ".";