add another condition in resetwin() to ensure the saved pixmap is reassigned to main window when returning from preview

This commit is contained in:
Stefan Schippers 2020-10-21 00:04:10 +02:00
parent 40a628dc34
commit 1ec0745b54
1 changed files with 2 additions and 2 deletions

View File

@ -216,8 +216,8 @@ void resetwin(int create_pixmap, int clear_pixmap, int preview_window)
areaw = areax2-areax1;
areah = areay2-areay1;
/* if no preview window avoid unnecessary work if no resize */
if(preview_window || xschem_w !=xrect[0].width || xschem_h !=xrect[0].height) {
/* if no preview_window or no create_pixmap avoid unnecessary work if no resize */
if( preview_window || !create_pixmap || xschem_w !=xrect[0].width || xschem_h !=xrect[0].height) {
dbg(1, "resetwin(): x=%d y=%d xschem_w=%d xschem_h=%d\n",
wattr.x, wattr.y, xschem_w,xschem_h);
dbg(1, "resetwin(): changing size\n\n");