From 1ec0745b54ea59a9149e1ce09eeea259f04ebc9e Mon Sep 17 00:00:00 2001 From: Stefan Schippers Date: Wed, 21 Oct 2020 00:04:10 +0200 Subject: [PATCH] add another condition in resetwin() to ensure the saved pixmap is reassigned to main window when returning from preview --- src/actions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actions.c b/src/actions.c index eb767b30..b4d08b02 100644 --- a/src/actions.c +++ b/src/actions.c @@ -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");