remove backslashes in translate3() call in draw_temp_symbol(), as done in draw_symbol()

This commit is contained in:
stefan schippers 2024-08-29 08:13:06 +02:00
parent eb7b9ae018
commit 1a2a925fbf
1 changed files with 5 additions and 4 deletions

View File

@ -766,13 +766,13 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot,
cairo_font_face_destroy(xctx->cairo_font);
}
#endif
dbg(1, "drawing string: before translate(): text.txt_ptr=%s\n", text.txt_ptr);
dbg(1, "draw_symbol(): drawing string: before translate(): text.txt_ptr=%s\n", text.txt_ptr);
my_strdup2(_ALLOC_ID_, &txtptr, translate(n, text.txt_ptr));
/* do another round of substitutions if some @var are found, but if not found leave @var as is */
dbg(1, "drawing string: str=%s prop=%s\n", txtptr, text.prop_ptr ? text.prop_ptr : "NULL");
dbg(1, "draw_symbol(): drawing string: str=%s prop=%s\n", txtptr, text.prop_ptr ? text.prop_ptr : "NULL");
my_strdup2(_ALLOC_ID_, &txtptr, translate3(txtptr, 1, xctx->inst[n].prop_ptr,
xctx->sym[xctx->inst[n].ptr].templ, NULL ));
dbg(1, "after translate3: str=%s\n", txtptr);
dbg(1, "draw_symbol(): after translate3: str=%s\n", txtptr);
draw_string(textlayer, what, txtptr,
(text.rot + ( (flip && (text.rot & 1) ) ? rot+2 : rot) ) & 0x3,
flip^text.flip, text.hcenter, text.vcenter,
@ -940,8 +940,9 @@ void draw_temp_symbol(int what, GC gc, int n,int layer,short tmp_flip, short rot
#endif
my_strdup2(_ALLOC_ID_, &txtptr, translate(n, text.txt_ptr));
/* do another round of substitutions if some @var are found, but if not found leave @var as is */
my_strdup2(_ALLOC_ID_, &txtptr, translate3(txtptr, 0, xctx->inst[n].prop_ptr,
my_strdup2(_ALLOC_ID_, &txtptr, translate3(txtptr, 1, xctx->inst[n].prop_ptr,
xctx->sym[xctx->inst[n].ptr].templ, NULL ));
dbg(1, "draw_temp_symbol(): after translate3: str=%s\n", txtptr);
if(txtptr[0]) draw_temp_string(gc, what, txtptr,
(text.rot + ( (flip && (text.rot & 1) ) ? rot+2 : rot) ) & 0x3,
flip^text.flip, text.hcenter, text.vcenter, x0+x1, y0+y1, xscale, yscale);