diff --git a/src/draw.c b/src/draw.c index ae959c75..593b1b90 100644 --- a/src/draw.c +++ b/src/draw.c @@ -717,12 +717,9 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot, } #endif my_strdup2(_ALLOC_ID_, &txtptr, translate(n, text.txt_ptr)); - /* this is not done in symbol_bbox and creates inconsistencies - * between bbox calculated text and displayed ext */ - /* - * if(strchr(txtptr, '@') && !strstr(text.txt_ptr, "\\@")) - * my_strdup2(_ALLOC_ID_, &txtptr, translate(n, txtptr)); - */ + /* 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, xctx->inst[n].prop_ptr, + xctx->sym[xctx->inst[n].ptr].templ, NULL )); dbg(1, "drawing string: str=%s prop=%s\n", txtptr, text.prop_ptr ? text.prop_ptr : "NULL"); draw_string(textlayer, what, txtptr, (text.rot + ( (flip && (text.rot & 1) ) ? rot+2 : rot) ) & 0x3, @@ -890,12 +887,9 @@ void draw_temp_symbol(int what, GC gc, int n,int layer,short tmp_flip, short rot customfont = set_text_custom_font(&text); #endif my_strdup2(_ALLOC_ID_, &txtptr, translate(n, text.txt_ptr)); - /* this is not done in symbol_bbox and creates inconsistencies - * between bbox calculated text and displayed ext */ - /* - * if(strchr(txtptr, '@') && !strstr(text.txt_ptr, "\\@")) - * my_strdup2(_ALLOC_ID_, &txtptr, translate(n, txtptr)); - */ + /* 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, xctx->inst[n].prop_ptr, + xctx->sym[xctx->inst[n].ptr].templ, NULL )); 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);