add Option menu `draw crosshair`, some fixes for crosshair restoring when unselecting
This commit is contained in:
parent
73ab9de8da
commit
5be402ea22
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue