avoid video updating when loading multiple files in hierarchical ps/pdf export
This commit is contained in:
parent
2e7eb9e38b
commit
52f35e30c2
10
src/draw.c
10
src/draw.c
|
|
@ -83,7 +83,7 @@ void print_image()
|
|||
#if HAS_CAIRO == 0
|
||||
char cmd[PATH_MAX+100];
|
||||
#endif
|
||||
int save_draw_grid, save_draw_window;
|
||||
int save, save_draw_grid, save_draw_window;
|
||||
static char lastdir[PATH_MAX] = "";
|
||||
const char *r;
|
||||
|
||||
|
|
@ -112,6 +112,7 @@ void print_image()
|
|||
save_draw_window = xctx->draw_window;
|
||||
xctx->draw_window=0;
|
||||
xctx->draw_pixmap=1;
|
||||
save = xctx->do_copy_area;
|
||||
xctx->do_copy_area=0;
|
||||
draw();
|
||||
|
||||
|
|
@ -158,7 +159,7 @@ void print_image()
|
|||
tclsetboolvar("draw_grid", save_draw_grid);
|
||||
xctx->draw_pixmap=1;
|
||||
xctx->draw_window=save_draw_window;
|
||||
xctx->do_copy_area=1;
|
||||
xctx->do_copy_area=save;
|
||||
}
|
||||
|
||||
#if HAS_CAIRO==1
|
||||
|
|
@ -3424,7 +3425,7 @@ void svg_embedded_graph(FILE *fd, xRect *r, double rx1, double ry1, double rx2,
|
|||
char transform[150];
|
||||
png_to_byte_closure_t closure;
|
||||
cairo_surface_t *png_sfc;
|
||||
int save_draw_window, save_draw_grid, rwi, rhi;
|
||||
int save, save_draw_window, save_draw_grid, rwi, rhi;
|
||||
size_t olength;
|
||||
const double max_size = 2000.0;
|
||||
|
||||
|
|
@ -3448,6 +3449,7 @@ void svg_embedded_graph(FILE *fd, xRect *r, double rx1, double ry1, double rx2,
|
|||
save_draw_window = xctx->draw_window;
|
||||
xctx->draw_window=0;
|
||||
xctx->draw_pixmap=1;
|
||||
save = xctx->do_copy_area;
|
||||
xctx->do_copy_area=0;
|
||||
draw();
|
||||
#ifdef __unix__
|
||||
|
|
@ -3479,7 +3481,7 @@ void svg_embedded_graph(FILE *fd, xRect *r, double rx1, double ry1, double rx2,
|
|||
cairo_surface_destroy(png_sfc);
|
||||
xctx->draw_pixmap=1;
|
||||
xctx->draw_window=save_draw_window;
|
||||
xctx->do_copy_area=1;
|
||||
xctx->do_copy_area=save;
|
||||
tclsetboolvar("draw_grid", save_draw_grid);
|
||||
save_restore_zoom(0);
|
||||
resetwin(1, 1, 1, 0, 0);
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ void ps_embedded_graph(xRect* r, double rx1, double ry1, double rx2, double ry2)
|
|||
#if defined(HAS_LIBJPEG) && HAS_CAIRO==1
|
||||
double rw, rh, scale;
|
||||
cairo_surface_t* png_sfc;
|
||||
int save_draw_window, save_draw_grid, rwi, rhi;
|
||||
int save, save_draw_window, save_draw_grid, rwi, rhi;
|
||||
const double max_size = 2000.0;
|
||||
int d_c;
|
||||
unsigned char* jpgData = NULL;
|
||||
|
|
@ -277,6 +277,7 @@ void ps_embedded_graph(xRect* r, double rx1, double ry1, double rx2, double ry2)
|
|||
save_draw_window = xctx->draw_window;
|
||||
xctx->draw_window = 0;
|
||||
xctx->draw_pixmap = 1;
|
||||
save = xctx->do_copy_area;
|
||||
xctx->do_copy_area = 0;
|
||||
d_c = tclgetboolvar("dark_colorscheme");
|
||||
tclsetboolvar("dark_colorscheme", 0);
|
||||
|
|
@ -310,7 +311,7 @@ void ps_embedded_graph(xRect* r, double rx1, double ry1, double rx2, double ry2)
|
|||
cairo_surface_destroy(png_sfc);
|
||||
xctx->draw_pixmap = 1;
|
||||
xctx->draw_window = save_draw_window;
|
||||
xctx->do_copy_area = 1;
|
||||
xctx->do_copy_area = save;
|
||||
tclsetboolvar("draw_grid", save_draw_grid);
|
||||
save_restore_zoom(0);
|
||||
resetwin(1, 1, 1, 0, 0);
|
||||
|
|
|
|||
|
|
@ -43,13 +43,15 @@ static const char *hier_psprint_mtime(const char *file_name)
|
|||
*/
|
||||
void hier_psprint(char **res, int what) /* netlister driver */
|
||||
{
|
||||
int i;
|
||||
int i, save;
|
||||
char *subckt_name;
|
||||
char filename[PATH_MAX];
|
||||
char *abs_path = NULL;
|
||||
struct stat buf;
|
||||
Str_hashtable subckt_table = {NULL, 0};
|
||||
|
||||
save = xctx->do_copy_area;
|
||||
xctx->do_copy_area = 0;
|
||||
if((what & 1) && !ps_draw(1)) return; /* prolog */
|
||||
xctx->push_undo();
|
||||
str_hash_init(&subckt_table, HASHSIZE);
|
||||
|
|
@ -117,6 +119,7 @@ void hier_psprint(char **res, int what) /* netlister driver */
|
|||
unselect_all(1);
|
||||
xctx->pop_undo(0, 0);
|
||||
my_strncpy(xctx->current_name, rel_sym_path(xctx->sch[xctx->currsch]), S(xctx->current_name));
|
||||
xctx->do_copy_area = save;
|
||||
if(what & 1) ps_draw(4); /* trailer */
|
||||
zoom_full(0, 0, 3, 0.97);
|
||||
draw();
|
||||
|
|
|
|||
Loading…
Reference in New Issue