A change_linewidth(-1.0) is added after resetwin() creates a new pixmap (example: after a window resize) . This sets colors, backgrounds fill styles for the new pixmap.

This commit is contained in:
Stefan Frederik 2020-12-26 22:29:45 +01:00
parent dfa0884180
commit 9b4534d6b0
3 changed files with 5 additions and 3 deletions

View File

@ -1369,7 +1369,7 @@ void zoom_full(int dr, int sel, int flags, double shrink)
xctx->xorigin = -boundbox.x1 + (1 - shrink) / 2 * xctx->zoom * schw;
xctx->yorigin = -boundbox.y1 + xctx->zoom * schh - bboxh - (1 - shrink) / 2 * xctx->zoom * schh;
}
dbg(1, "zoom_full(): areaw=%d, areah=%d\n", xctx->areaw, xctx->areah);
dbg(1, "zoom_full(): dr=%d sel=%d flags=%d areaw=%d, areah=%d\n", sel, dr, flags, xctx->areaw, xctx->areah);
if(flags & 1) change_linewidth(-1.);
if(dr && has_x) draw();
}

View File

@ -1006,7 +1006,7 @@ void resetwin(int create_pixmap, int clear_pixmap, int force, int w, int h)
xctx->areah = xctx->areay2-xctx->areay1;
/* if no force avoid unnecessary work if no resize */
if( force || xctx->xschem_w !=xctx->xrect[0].width || xctx->xschem_h !=xctx->xrect[0].height) {
dbg(1, "resetwin(): %d, %d, %d, xschem_w=%d xschem_h=%d\n",
dbg(1, "resetwin(): create: %d, clear: %d, force: %d, xschem_w=%d xschem_h=%d\n",
create_pixmap, clear_pixmap, force, xctx->xschem_w,xctx->xschem_h);
dbg(1, "resetwin(): changing size\n\n");
xctx->xrect[0].x = 0;
@ -1031,6 +1031,8 @@ void resetwin(int create_pixmap, int clear_pixmap, int force, int w, int h)
xctx->gctiled = XCreateGC(display,xctx->window,0L, NULL);
XSetTile(display,xctx->gctiled, xctx->save_pixmap);
XSetFillStyle(display,xctx->gctiled,FillTiled);
/* whenever a pixmap is recreated all GC attributes must be reissued */
change_linewidth(-1.0);
resetcairo(1, 0, 1); /* create, clear, force */
}
}

View File

@ -628,7 +628,7 @@ tclcommand=" set count 0
update ;# allow event loop to come in (update screen, user input etc)
incr count
after 500
if \{$count==300 || $tclstop == 1\} break
if \{$count==30 || $tclstop == 1\} break
xschem logic_set $logic_value
set logic_value [expr !$logic_value]
\}