diff --git a/doc/xschem_man/commands.html b/doc/xschem_man/commands.html index 144260fc..e0d8950b 100644 --- a/doc/xschem_man/commands.html +++ b/doc/xschem_man/commands.html @@ -198,7 +198,7 @@ ctrl '+' Test mode: change line width '+' brite colors - '_' Toggle change line width - '%' Toggle draw grid -- '=' Toggle fill rectangles +ctrl '=' Toggle fill rectangles - '$' Toggle pixmap saving ctrl '$' Toggle use XCopyArea vs drawing primitives for drawing the screen - ':' Toggle flat netlist diff --git a/src/callback.c b/src/callback.c index ea900505..ee2ce23f 100644 --- a/src/callback.c +++ b/src/callback.c @@ -391,7 +391,7 @@ int callback(int event, int mx, int my, KeySym key, print_hilight_net(3); break; } - if(key == 'J' && state==ShiftMask) { /* testmode */ + if(key == 'J' && state==ShiftMask) { create_plot_cmd(NGSPICE); break; } diff --git a/src/findnet.c b/src/findnet.c index 0c2a337f..28612495 100644 --- a/src/findnet.c +++ b/src/findnet.c @@ -254,10 +254,11 @@ void find_closest_element(double mx,double my) if( POINTINSIDE(mx,my,inst_ptr[i].x1,inst_ptr[i].y1,inst_ptr[i].x2,inst_ptr[i].y2) ) { /* tmp=pow(mx-inst_ptr[i].x0, 2)+pow(my-inst_ptr[i].y0, 2); */ - tmp=pow(mx-(inst_ptr[i].x1 + inst_ptr[i].x2)/2, 2)+pow(my-(inst_ptr[i].y1 + inst_ptr[i].y2)/2, 2); - if(tmp*.1 < distance) + tmp=pow(mx-(inst_ptr[i].xx1 + inst_ptr[i].xx2)/2, 2)+pow(my-(inst_ptr[i].yy1 + inst_ptr[i].yy2)/2, 2); + dbg(0, "i=%d, xx1=%g, yy1=%g, xx2=%g, yy2=%g\n", i, inst_ptr[i].xx1, inst_ptr[i].yy1, inst_ptr[i].xx2, inst_ptr[i].yy2); + if(tmp*0.1 < distance) { - r = i; distance = tmp; + r = i; distance = tmp*0.1; } dbg(2, "find_closest_element(): finding closest element, lastinst=%d, dist=%.16g\n",i,tmp); } diff --git a/src/keys.help b/src/keys.help index a314e048..a2b51f2a 100644 --- a/src/keys.help +++ b/src/keys.help @@ -158,7 +158,7 @@ ctrl '+' Test mode: change line width '+' brite colors - '_' Toggle change line width - '%' Toggle draw grid -- '=' Toggle fill rectangles +ctrl '=' Toggle fill rectangles - '$' Toggle pixmap saving ctrl '$' Toggle use XCopyArea vs drawing primitives for drawing the screen - ':' Toggle flat netlist