diff --git a/src/actions.c b/src/actions.c index cd30b216..a4db181c 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1716,7 +1716,7 @@ void launcher(void) const char *url; char program[PATH_MAX]; int n, c; - char *prop_ptr; + char *prop_ptr=NULL; rebuild_selected_array(); tcleval("update"); if(xctx->lastsel ==1) diff --git a/src/callback.c b/src/callback.c index 5d8671c2..177ae9cc 100644 --- a/src/callback.c +++ b/src/callback.c @@ -3519,13 +3519,13 @@ int rstate; /* (reduced state, without ShiftMask) */ select_rect(END,-1); } } - if(draw_xhair) draw_crosshair(0); rebuild_selected_array(); my_snprintf(str, S(str), "mouse = %.16g %.16g - selected: %d path: %s", xctx->mousex_snap, xctx->mousey_snap, xctx->lastsel, xctx->sch_path[xctx->currsch] ); statusmsg(str,1); } + if(draw_xhair) draw_crosshair(0); break; case -3: /* double click : edit prop */ if( waves_selected(event, key, state, button)) { diff --git a/src/clip.c b/src/clip.c index f0fa3d82..0daa0642 100644 --- a/src/clip.c +++ b/src/clip.c @@ -161,12 +161,12 @@ double dist_from_rect(double mx, double my, double x1, double y1, double x2, dou {/* return square of dist... */ double dist, tmp; - dist=mx-x1; - tmp=x2-mx; + dist=fabs(mx-x1); + tmp=fabs(x2-mx); if(tmp < dist) dist=tmp; - tmp=my-y1; + tmp=fabs(my-y1); if(tmp < dist) dist=tmp; - tmp=y2-my; + tmp=fabs(y2-my); if(tmp < dist) dist=tmp; dbg(1, "dist_from_rect(): x1,y1,x2,y2=%.16g,%.16g,%.16g,%.16g\n",x1,y1,x2,y2); diff --git a/src/scheduler.c b/src/scheduler.c index 89c8ab92..f53150db 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1810,11 +1810,13 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg my_snprintf(res, S(res), "undo_type=%d\n", xctx->undo_type); Tcl_AppendResult(interp, res, NULL); my_snprintf(res, S(res), "******* end global variables:*******\n"); Tcl_AppendResult(interp, res, NULL); +#ifdef __unix__ my_snprintf(res, S(res), "******* Xserver options: *******\n"); Tcl_AppendResult(interp, res, NULL); my_snprintf(res, S(res), "XMaxRequestSize=%ld\n", XMaxRequestSize(display)); Tcl_AppendResult(interp, res, NULL); my_snprintf(res, S(res), "XExtendedMaxRequestSize=%ld\n", XExtendedMaxRequestSize(display)); Tcl_AppendResult(interp, res, NULL); +#endif my_snprintf(res, S(res), "******* Compile options:*******\n"); Tcl_AppendResult(interp, res, NULL); #ifdef HAS_DUP2 diff --git a/src/xschem.tcl b/src/xschem.tcl index 2a21c3b6..9bf209c1 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -7232,7 +7232,7 @@ proc load_raw {{type {}}} { proc build_widgets { {topwin {} } } { global XSCHEM_SHAREDIR tabbed_interface simulate_bg OS sim - global dark_gui_colorscheme + global dark_gui_colorscheme draw_crosshair global recentfile color_ps transparent_svg menu_debug_var enable_stretch global netlist_show flat_netlist split_files compare_sch intuitive_interface global draw_grid big_grid_points sym_txt change_lw incr_hilight symbol_width @@ -7389,6 +7389,9 @@ proc build_widgets { {topwin {} } } { -variable intuitive_interface -selectcolor $selectcolor \ -command {xschem set intuitive_interface $intuitive_interface} + $topwin.menubar.option.menu add checkbutton -label "Draw crosshair" \ + -variable draw_crosshair -selectcolor $selectcolor + $topwin.menubar.option.menu add command -label "Replace \[ and \] for buses in SPICE netlist" \ -command { input_line "Enter two characters to replace default bus \[\] delimiters:" "set bus_replacement_char"