save schematic before doing schematic compare as it will be reloaded from disk at end.

This commit is contained in:
Stefan Frederik 2022-08-25 23:01:56 +02:00
parent 279e4604ea
commit a53fc67404
2 changed files with 4 additions and 0 deletions

View File

@ -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));

View File

@ -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 : ".";