From d59196f1d4acd19506a1b226af66005c8f167ae3 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Thu, 14 Mar 2024 20:25:50 +0100 Subject: [PATCH] fix erroneous bbox(START...) call in edit_rect_property() not followed by bbox(SET...) and bbox(END...), possibly locking the UI --- src/cairo_jpg.c | 2 +- src/editprop.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cairo_jpg.c b/src/cairo_jpg.c index a4a49d82..62bc20cf 100644 --- a/src/cairo_jpg.c +++ b/src/cairo_jpg.c @@ -376,7 +376,7 @@ cairo_surface_t *cairo_image_surface_create_from_jpeg_mem(void *data, size_t len jpeg_destroy_decompress(&cinfo); /* Stefan: commented out since this assumes static lifetime of 'data' buffer - * that I don't assume. I consider this a bug */ + * that I don't assume. I consider this a bug. Embedding jpeg data should be optional */ /* set jpeg mime data */ /* cairo_surface_set_mime_data(sfc, CAIRO_MIME_TYPE_JPEG, data, len, free, data);*/ diff --git a/src/editprop.c b/src/editprop.c index 76e25a9e..2e7bd9b6 100644 --- a/src/editprop.c +++ b/src/editprop.c @@ -901,7 +901,6 @@ static int edit_rect_property(int x) if(strcmp(tclgetvar("tctx::rcode"),"") ) { xctx->push_undo(); - bbox(START, 0.0 , 0.0 , 0.0 , 0.0); for(i=0; ilastsel; ++i) { if(xctx->sel_array[i].type != xRECT) continue; c = xctx->sel_array[i].col; @@ -930,6 +929,9 @@ static int edit_rect_property(int x) if( (oldprop && xctx->rect[c][n].prop_ptr && strcmp(oldprop, xctx->rect[c][n].prop_ptr)) || (!oldprop && xctx->rect[c][n].prop_ptr) || (oldprop && !xctx->rect[c][n].prop_ptr)) { modified = 1; + if(!drw) { + bbox(START, 0.0 , 0.0 , 0.0 , 0.0); + } drw = 1; if( xctx->rect[c][n].flags & 1024) { draw_image(0, &xctx->rect[c][n], &xctx->rect[c][n].x1, &xctx->rect[c][n].y1,