diff --git a/src/actions.c b/src/actions.c index e5712d06..8165eedf 100644 --- a/src/actions.c +++ b/src/actions.c @@ -3429,23 +3429,11 @@ void select_rect(int what, int select) /* 20171026 update unselected objects while dragging */ rebuild_selected_array(); - #if 0 - if(xctx->nl_dir == 0) { - bbox(START,0.0, 0.0, 0.0, 0.0); - bbox(ADD, xctx->nl_xx1, xctx->nl_yy1, xctx->nl_xx2, xctx->nl_yy2); - bbox(SET,0.0, 0.0, 0.0, 0.0); - } - #endif draw_selection(xctx->gc[SELLAYER], 0); /* if(xctx->nl_sel) { */ if(xctx->nl_dir == 0) select_inside(xctx->nl_xx1, xctx->nl_yy1, xctx->nl_xx2, xctx->nl_yy2, xctx->nl_sel); else select_touch(xctx->nl_xx1, xctx->nl_yy1, xctx->nl_xx2, xctx->nl_yy2, xctx->nl_sel); /* } */ - #if 0 - if(xctx->nl_dir == 0) { - bbox(END,0.0, 0.0, 0.0, 0.0); - } - #endif xctx->nl_xx1=xctx->nl_xr;xctx->nl_xx2=xctx->nl_xr2;xctx->nl_yy1=xctx->nl_yr;xctx->nl_yy2=xctx->nl_yr2; RECTORDER(xctx->nl_xx1,xctx->nl_yy1,xctx->nl_xx2,xctx->nl_yy2); drawtemprect(xctx->gc[SELLAYER],NOW, xctx->nl_xx1,xctx->nl_yy1,xctx->nl_xx2,xctx->nl_yy2); @@ -3480,26 +3468,10 @@ void select_rect(int what, int select) } else { drawtemprect(xctx->gctiled, NOW, xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2); } - - /* draw_selection(xctx->gc[SELLAYER], 0); */ if(xctx->nl_dir == 0) select_inside(xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2, xctx->nl_sel); else select_touch(xctx->nl_xr,xctx->nl_yr,xctx->nl_xr2,xctx->nl_yr2, xctx->nl_sel); - #if 0 - if(xctx->nl_dir == 0) { - bbox(START,0.0, 0.0, 0.0, 0.0); - bbox(ADD, xctx->nl_xr, xctx->nl_yr, xctx->nl_xr2, xctx->nl_yr2); - bbox(SET,0.0, 0.0, 0.0, 0.0); - } - #endif draw_selection(xctx->gc[SELLAYER], 0); - #if 0 - if(xctx->nl_dir == 0) { - bbox(END,0.0, 0.0, 0.0, 0.0); - } - #endif - /* /20171219 */ - xctx->ui_state &= ~STARTSELECT; xctx->nl_sem=0; } diff --git a/src/editprop.c b/src/editprop.c index 8f3548d8..6c355dce 100644 --- a/src/editprop.c +++ b/src/editprop.c @@ -1250,20 +1250,6 @@ static int edit_text_property(int x) for(l=0;ltext[sel].txt_ptr && !strcmp( (get_tok_value(xctx->rect[PINLAYER][l].prop_ptr, "name",0)), xctx->text[sel].txt_ptr) ) { - /* - #if HAS_CAIRO==1 - customfont = set_text_custom_font(&xctx->text[sel]); - #endif - text_bbox(get_text_floater(sel), xctx->text[sel].xscale, - xctx->text[sel].yscale, (short)rot, (short)flip, xctx->text[sel].hcenter, - xctx->text[sel].vcenter, xctx->text[sel].x0, xctx->text[sel].y0, - &xx1,&yy1,&xx2,&yy2, &tmp, &dtmp); - #if HAS_CAIRO==1 - if(customfont) { - cairo_restore(xctx->cairo_ctx); - } - #endif - */ pcx = (xctx->rect[PINLAYER][l].x1+xctx->rect[PINLAYER][l].x2)/2.0; pcy = (xctx->rect[PINLAYER][l].y1+xctx->rect[PINLAYER][l].y2)/2.0; if( @@ -1300,20 +1286,6 @@ static int edit_text_property(int x) xctx->text[sel].xscale=hsize; xctx->text[sel].yscale=vsize; } - /* calculate bbox, some cleanup needed here */ - #if HAS_CAIRO==1 - customfont = set_text_custom_font(&xctx->text[sel]); - #endif - text_bbox(get_text_floater(sel), xctx->text[sel].xscale, - xctx->text[sel].yscale, (short)rot, (short)flip, xctx->text[sel].hcenter, - xctx->text[sel].vcenter, xctx->text[sel].x0, xctx->text[sel].y0, - &xx1,&yy1,&xx2,&yy2, &tmp, &dtmp); - #if HAS_CAIRO==1 - if(customfont) { - cairo_restore(xctx->cairo_ctx); - } - #endif - } /* for(k=0;klastsel; ++k) */ draw(); } diff --git a/src/scheduler.c b/src/scheduler.c index 96c0ebef..312efe22 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -2492,13 +2492,17 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg } } if(argc > 6) { - int i; + int i, s_pnetname, floaters; if((i = get_instance(argv[2])) < 0 ) { Tcl_SetResult(interp, "xschem move_instance: instance not found", TCL_STATIC); return TCL_ERROR; } + s_pnetname = tclgetboolvar("show_pin_net_names"); + floaters = set_modify(1); + floaters |= s_pnetname; + if(undo) xctx->push_undo(); - if(dr) { + if(dr && !floaters) { bbox(START,0.0,0.0,0.0,0.0); bbox(ADD, xctx->inst[i].x1, xctx->inst[i].y1, xctx->inst[i].x2, xctx->inst[i].y2); } @@ -2507,16 +2511,19 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(strcmp(argv[5], "-")) xctx->inst[i].rot = (unsigned short)atoi(argv[5]); if(strcmp(argv[6], "-")) xctx->inst[i].flip = (unsigned short)atoi(argv[6]); symbol_bbox(i, &xctx->inst[i].x1, &xctx->inst[i].y1, &xctx->inst[i].x2, &xctx->inst[i].y2); - if(dr) { - bbox(ADD, xctx->inst[i].x1, xctx->inst[i].y1, xctx->inst[i].x2, xctx->inst[i].y2); - bbox(SET,0.0,0.0,0.0,0.0); - draw(); - bbox(END,0.0,0.0,0.0,0.0); - } - set_modify(1); xctx->prep_hash_inst=0; xctx->prep_net_structs=0; xctx->prep_hi_structs=0; + if(dr) { + if(!floaters) { + bbox(ADD, xctx->inst[i].x1, xctx->inst[i].y1, xctx->inst[i].x2, xctx->inst[i].y2); + bbox(SET,0.0,0.0,0.0,0.0); + } + draw(); + if(!floaters) { + bbox(END,0.0,0.0,0.0,0.0); + } + } } } /* move_objects [dx dy] [kissing] [stretch]