From aaac47720f0b4400b1e936069607f03f852c1574 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 23 Sep 2024 23:17:19 +0200 Subject: [PATCH] draw_image(): add cairo_flush() to flush pending paints. In some cases a black square was exported instead of the image... Update Changelog for upcoming 3.4.6 --- Changelog | 11 +++++++++++ src/actions.c | 1 + src/draw.c | 2 ++ 3 files changed, 14 insertions(+) diff --git a/Changelog b/Changelog index 24e167d3..d8af9695 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,15 @@ 3.4.6: +- do not reset xctx->netlist_name after doing `Netlist` from gui (xschem netlist -erc) +- process tcleval(....) (if present) in symbol `name` argument +- let symbol name entry box in component edit property dialog box expand in X direction + if dialog box is enlarged +- replace "UNDEF" with "-" in backannotated nodes that have no value in raw file. +- draw node names in graphs even if specified file / analysis (graph rawfile or sim_type + attributes) is not loaded +- if autoload is set in graph and a filename is given (rawfile graph attr) load raw file immediately + when drawing graph. Don`t wait for user to load an intiial raw file to trigger auto loading +- double clicking in the center of a graph will now bring up the graph edit attributes + dialog box even if no raw file is loaded - Graphs will autoload (if autoload checked) raw data even if no raw file is specified in graph dialog box (use current loaded raw file, usually with a different analysis) - Save 4 vars ( node, ph(node), re(node, im(node) ) instead of 2 ( node, ph(node )for ac plots diff --git a/src/actions.c b/src/actions.c index 83e3f5be..db087fe1 100644 --- a/src/actions.c +++ b/src/actions.c @@ -2747,6 +2747,7 @@ void zoom_box(double x1, double y1, double x2, double y2, double factor) xctx->mooz=1/xctx->zoom; xctx->xorigin=xctx->xorigin+xctx->areaw*xctx->zoom*(1-1/factor)/2; xctx->yorigin=xctx->yorigin+xctx->areah*xctx->zoom*(1-1/factor)/2; + dbg(1, "zoom_box(): zoom=%g\n", xctx->zoom); } void zoom_rectangle(int what) diff --git a/src/draw.c b/src/draw.c index 22f162f5..fefa24d8 100644 --- a/src/draw.c +++ b/src/draw.c @@ -4451,6 +4451,7 @@ int draw_image(int dr, xRect *r, double *x1, double *y1, double *x2, double *y2, * cairo_stroke(xctx->cairo_save_ctx); */ cairo_clip(xctx->cairo_save_ctx); cairo_paint_with_alpha(xctx->cairo_save_ctx, alpha); + cairo_surface_flush(xctx->cairo_save_sfc); } if(dr && xctx->draw_window) { cairo_translate(xctx->cairo_ctx, x, y); @@ -4464,6 +4465,7 @@ int draw_image(int dr, xRect *r, double *x1, double *y1, double *x2, double *y2, * cairo_stroke(xctx->cairo_ctx); */ cairo_clip(xctx->cairo_ctx); cairo_paint_with_alpha(xctx->cairo_ctx, alpha); + cairo_surface_flush(xctx->cairo_sfc); } if(dr) { cairo_restore(xctx->cairo_ctx);