From d094ef55b70cf6240cb3728f5c48a5458e0f4707 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Thu, 7 Dec 2023 18:28:44 +0100 Subject: [PATCH] fix setting old_translated_sym in update_symbol() --- src/editprop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/editprop.c b/src/editprop.c index 58187efc..bc5861e0 100644 --- a/src/editprop.c +++ b/src/editprop.c @@ -1356,7 +1356,7 @@ static int update_symbol(const char *result, int x, int selected_inst) /* 20171220 calculate bbox before changes to correctly redraw areas */ /* must be recalculated as cairo text extents vary with zoom factor. */ symbol_bbox(*ii, &xctx->inst[*ii].x1, &xctx->inst[*ii].y1, &xctx->inst[*ii].x2, &xctx->inst[*ii].y2); - + my_strdup2(_ALLOC_ID_, &old_translated_sym, translate(*ii, xctx->inst[*ii].name)); /* update property string from tcl dialog */ if(!no_change_props) { @@ -1389,7 +1389,6 @@ static int update_symbol(const char *result, int x, int selected_inst) * to use for inst name (from symbol template) */ prefix = 0; sym_number = -1; - my_strdup2(_ALLOC_ID_, &old_translated_sym, translate(*ii, xctx->inst[*ii].name)); my_strdup2(_ALLOC_ID_, &translated_sym, translate(*ii, symbol)); dbg(1, "update_symbol: %s -- %s\n", translated_sym, old_translated_sym); if(changed_symbol ||