correctly set top_path and current_win_path in preview_window() when calling alloc_xschem_data(), don`t use fake window paths (alert_ proc uses parent win path)

This commit is contained in:
stefan schippers 2024-08-31 09:00:48 +02:00
parent 2b94e845c0
commit d40a17df64
1 changed files with 1 additions and 1 deletions

View File

@ -1233,7 +1233,7 @@ int preview_window(const char *what, const char *win_path, const char *fname)
}
my_strdup(_ALLOC_ID_, &current_file[i], fname);
xctx = NULL; /* reset for preview */
alloc_xschem_data(".dialog", ".dialog.drw"); /* alloc data into xctx */
alloc_xschem_data(save_xctx->top_path, save_xctx->current_win_path); /* alloc data into xctx */
init_pixdata(); /* populate xctx->fill_type array that is used in create_gc() to set fill styles */
preview_xctx[i] = xctx;
preview_xctx[i]->window = Tk_WindowId(tkpre_window[i]);