removed completely menu View->Show/hide->Show net names on symbol pins

This commit is contained in:
stefan schippers 2024-05-02 14:41:15 +02:00
parent cb2eddfc81
commit 501fb7943f
3 changed files with 13 additions and 69 deletions

View File

@ -2855,9 +2855,8 @@ static void restore_selection(double x1, double y1, double x2, double y2)
void new_wire(int what, double mx_snap, double my_snap)
{
int s_pnetname, modified = 0;
int modified = 0;
if( (what & PLACE) ) {
s_pnetname = tclgetboolvar("show_pin_net_names");
if( (xctx->ui_state & STARTWIRE) && (xctx->nl_x1!=xctx->nl_x2 || xctx->nl_y1!=xctx->nl_y2) ) {
xctx->push_undo();
if(xctx->manhattan_lines==1) {
@ -2909,14 +2908,12 @@ void new_wire(int what, double mx_snap, double my_snap)
}
xctx->prep_hi_structs = 0;
if(tclgetboolvar("autotrim_wires")) trim_wires();
if(s_pnetname || xctx->hilight_nets) {
prepare_netlist_structs(0); /* since xctx->prep_hi_structs==0, do a delete_netlist_structs() first,
* this clears both xctx->prep_hi_structs and xctx->prep_net_structs. */
if(xctx->hilight_nets) {
propagate_hilights(1, 1, XINSERT_NOREPLACE);
}
draw();
} else update_conn_cues(WIRELAYER, 1,1);
prepare_netlist_structs(0); /* since xctx->prep_hi_structs==0, do a delete_netlist_structs() first,
* this clears both xctx->prep_hi_structs and xctx->prep_net_structs. */
if(xctx->hilight_nets) {
propagate_hilights(1, 1, XINSERT_NOREPLACE);
}
draw();
/* draw_hilight_net(1);*/ /* for updating connection bubbles on hilight nets */
}
if(! (what &END)) {

View File

@ -2942,20 +2942,12 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
}
}
if(argc > 6) {
int i, s_pnetname, floaters;
int i;
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 && !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);
}
if(strcmp(argv[3], "-")) xctx->inst[i].x0 = atof(argv[3]);
if(strcmp(argv[4], "-")) xctx->inst[i].y0 = atof(argv[4]);
if(strcmp(argv[5], "-")) xctx->inst[i].rot = (unsigned short)atoi(argv[5]);
@ -2965,14 +2957,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
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);
}
}
}
}
@ -4204,9 +4189,8 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
else if(!strcmp(argv[1], "reset_inst_prop"))
{
char *translated_sym = NULL;
int floaters = 0, sym_number = -1;
int sym_number = -1;
char *subst = NULL;
int s_pnetname = tclgetboolvar("show_pin_net_names");
int inst;
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
@ -4218,12 +4202,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
Tcl_SetResult(interp, "xschem reset_inst_prop: instance not found", TCL_STATIC);
return TCL_ERROR;
}
floaters = set_modify(1);
floaters |= s_pnetname;
if(!floaters) bbox(START,0.0,0.0,0.0,0.0);
symbol_bbox(inst, &xctx->inst[inst].x1, &xctx->inst[inst].y1, &xctx->inst[inst].x2, &xctx->inst[inst].y2);
if(!floaters)
bbox(ADD, xctx->inst[inst].x1, xctx->inst[inst].y1, xctx->inst[inst].x2, xctx->inst[inst].y2);
xctx->push_undo();
xctx->prep_hash_inst=0;
xctx->prep_net_structs=0;
@ -4245,16 +4224,8 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
hash_names(inst, XINSERT);
/* new symbol bbox after prop changes (may change due to text length) */
symbol_bbox(inst, &xctx->inst[inst].x1, &xctx->inst[inst].y1, &xctx->inst[inst].x2, &xctx->inst[inst].y2);
if(!floaters) {
bbox(ADD, xctx->inst[inst].x1, xctx->inst[inst].y1, xctx->inst[inst].x2, xctx->inst[inst].y2);
/* redraw symbol with new props */
bbox(SET,0.0,0.0,0.0,0.0);
}
set_modify(-2); /* reset floaters caches */
draw();
if(!floaters) {
bbox(END,0.0,0.0,0.0,0.0);
}
my_free(_ALLOC_ID_, &translated_sym);
Tcl_SetResult(interp, xctx->inst[inst].instname , TCL_VOLATILE);
}
@ -5036,16 +5007,10 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
return TCL_ERROR;
} else {
char *translated_sym = NULL;
int floaters = 0, sym_number = -1;
int sym_number = -1;
char *subst = NULL;
int s_pnetname = tclgetboolvar("show_pin_net_names");
floaters = set_modify(1);
floaters |= s_pnetname;
if(!fast) {
if(!floaters) bbox(START,0.0,0.0,0.0,0.0);
symbol_bbox(inst, &xctx->inst[inst].x1, &xctx->inst[inst].y1, &xctx->inst[inst].x2, &xctx->inst[inst].y2);
if(!floaters)
bbox(ADD, xctx->inst[inst].x1, xctx->inst[inst].y1, xctx->inst[inst].x2, xctx->inst[inst].y2);
xctx->push_undo();
}
xctx->prep_hash_inst=0;
@ -5082,16 +5047,8 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
if(!fast) {
/* new symbol bbox after prop changes (may change due to text length) */
symbol_bbox(inst, &xctx->inst[inst].x1, &xctx->inst[inst].y1, &xctx->inst[inst].x2, &xctx->inst[inst].y2);
if(!floaters) {
bbox(ADD, xctx->inst[inst].x1, xctx->inst[inst].y1, xctx->inst[inst].x2, xctx->inst[inst].y2);
/* redraw symbol with new props */
bbox(SET,0.0,0.0,0.0,0.0);
}
set_modify(-2); /* reset floaters caches */
draw();
if(!floaters) {
bbox(END,0.0,0.0,0.0,0.0);
}
}
my_free(_ALLOC_ID_, &translated_sym);
Tcl_SetResult(interp, xctx->inst[inst].instname , TCL_VOLATILE);
@ -5741,7 +5698,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
}
/* update_all_sym_bboxes
* Update all symbol bounding boxes (useful if show_pin_net_names is set) */
* Update all symbol bounding boxes */
else if(!strcmp(argv[1], "update_all_sym_bboxes"))
{
int i;

View File

@ -6932,7 +6932,7 @@ set tctx::global_list {
tctx::rcode recentfile
retval retval_orig rotated_text search_case search_exact search_found search_schematic
search_select search_value selected_tok show_hidden_texts show_infowindow
show_infowindow_after_netlist show_pin_net_names
show_infowindow_after_netlist
simconf_default_geometry simconf_vpos simulate_bg spiceprefix split_files svg_colors
svg_font_name sym_txt symbol symbol_width tclcmd_txt tclstop text_line_default_geometry
text_replace_selection textwindow_fileid textwindow_filename textwindow_w
@ -7303,7 +7303,7 @@ proc build_widgets { {topwin {} } } {
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
global cadsnap cadgrid draw_window show_pin_net_names toolbar_visible hide_symbols undo_type
global cadsnap cadgrid draw_window toolbar_visible hide_symbols undo_type
global disable_unique_names persistent_command autotrim_wires en_hilight_conn_inst
global local_netlist_dir editor netlist_type netlist_dir spiceprefix initial_geometry
set mbg {}
@ -7697,13 +7697,6 @@ proc build_widgets { {topwin {} } } {
-selectcolor $selectcolor -command {xschem update_all_sym_bboxes; xschem redraw}
$topwin.menubar.view.menu.show add checkbutton -label "Draw grid axes" -variable draw_grid_axes \
-selectcolor $selectcolor -command {xschem redraw}
$topwin.menubar.view.menu.show add checkbutton -label "Show net names on symbol pins/floaters" \
-selectcolor $selectcolor -variable show_pin_net_names \
-command {
xschem update_all_sym_bboxes
xschem redraw
}
$topwin.menubar.prop.menu add command -label "Edit" -command "xschem edit_prop" -accelerator Q
$topwin.menubar.prop.menu add command -label "Edit with editor" -command "xschem edit_vi_prop" -accelerator Shift+Q
$topwin.menubar.prop.menu add command -label "View" -command "xschem view_prop" -accelerator Ctrl+Shift+Q
@ -8453,9 +8446,6 @@ set_ne keep_symbols 0 ;# if set loaded symbols will not be purged when descendin
# hide instance details (show only bbox)
set_ne hide_symbols 0
# show net names if symbol has attributes like @#n:net_name (where n = pin number or pin name)
# and net_name=true global attribute set on symbol or instance.
set_ne show_pin_net_names 1
# gaw tcp {host port}
set_ne gaw_tcp_address {localhost 2020}