From f138db5aba04fd25dbe50e0ab5517153b183c3d6 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Sat, 5 Dec 2020 04:12:56 +0100 Subject: [PATCH] fix linewidth when done with preview, also avoid to destroy & create main pixmap since it was saved --- src/xinit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xinit.c b/src/xinit.c index 232c161a..13eaed30 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -906,7 +906,9 @@ void preview_window(const char *what, const char *tk_win_path, const char *filen my_free(1144, ¤t_file); xctx = save_xctx; /* restore schematic */ save_xctx = NULL; - resetwin(1, 1, 1); /* handle resize. resetwin(create_pixmap, clear_pixmap, force) */ + resetwin(0, 0, 1); /* handle resize. resetwin(create_pixmap, clear_pixmap, force) */ + change_linewidth(xctx->lw); /* restore correct linewidth since it was changed in preview + * need to do the XSetLineAttributes */ set_modify(xctx->modified); } }