diff --git a/src/draw.c b/src/draw.c index 1d239f16..ae959c75 100644 --- a/src/draw.c +++ b/src/draw.c @@ -717,9 +717,13 @@ 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)); - if(strchr(txtptr, '@') && !strstr(text.txt_ptr, "\\@")) - my_strdup2(_ALLOC_ID_, &txtptr, translate(n, txtptr)); - dbg(1, "drawing string: str=%s prop=%s\n", txtptr, text.prop_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)); + */ + 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, flip^text.flip, text.hcenter, text.vcenter, @@ -886,8 +890,12 @@ 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)); - if(strchr(txtptr, '@') && !strstr(text.txt_ptr, "\\@")) - my_strdup2(_ALLOC_ID_, &txtptr, translate(n, txtptr)); + /* 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)); + */ 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); diff --git a/src/select.c b/src/select.c index ad26bdaa..4cb8480f 100644 --- a/src/select.c +++ b/src/select.c @@ -360,9 +360,9 @@ void symbol_bbox(int i, double *x1,double *y1, double *x2, double *y2) if(!xctx->show_hidden_texts && (text.flags & (HIDE_TEXT | HIDE_TEXT_INSTANTIATED))) continue; sym_flip = flip; sym_rot = rot; - /* dbg(2, "symbol_bbox(): instance %d text n: %d text str=%s\n", i,j, text.txt_ptr? text.txt_ptr:"NULL"); */ + dbg(1, "symbol_bbox(): instance %d text n: %d text str=%s\n", i,j, text.txt_ptr? text.txt_ptr:"NULL"); tmp_txt = translate(i, text.txt_ptr); - /* dbg(2, "symbol_bbox(): translated text: %s\n", tmp_txt); */ + dbg(1, "symbol_bbox(): translated text: %s\n", tmp_txt); ROTATION(rot, flip, 0.0,0.0,text.x0, text.y0,text_x0,text_y0); #if HAS_CAIRO==1 customfont=set_text_custom_font(&text);