add "Properties" menu for "Change selected object insertion order" (Shift-S)

This commit is contained in:
stefan schippers 2024-10-14 21:41:07 +02:00
parent 02a891b173
commit 30e407b743
3 changed files with 5 additions and 5 deletions

View File

@ -1715,6 +1715,7 @@ void change_elem_order(int n)
xctx->prep_hash_inst=0;
xctx->prep_net_structs=0;
xctx->prep_hi_structs=0;
xctx->prep_hash_wires=0;
}
sscanf(tclgetvar("retval"), "%d",&new_n);
if(new_n < 0) new_n = 0;
@ -1725,6 +1726,7 @@ void change_elem_order(int n)
xctx->prep_hash_inst=0;
xctx->prep_net_structs=0;
xctx->prep_hi_structs=0;
xctx->prep_hash_wires=0;
}
if(xctx->sel_array[0].type==ELEMENT)

View File

@ -436,12 +436,8 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
if(argc > 2) {
int n = atoi(argv[2]);
if(n >= 0) {
if(n >= 0 || n == -1) {
change_elem_order(n);
xctx->prep_hash_wires=0;
xctx->prep_hash_inst=0;
xctx->prep_net_structs=0;
xctx->prep_hi_structs=0;
}
}
}

View File

@ -7751,6 +7751,8 @@ proc build_widgets { {topwin {} } } {
$topwin.menubar.prop.menu add command -label "View" -command "xschem view_prop" -accelerator Ctrl+Shift+Q
$topwin.menubar.prop.menu add command -label "Toggle *_ignore attribute on selected instances" \
-command "xschem toggle_ignore" -accelerator Shift+T
$topwin.menubar.prop.menu add command -label "Change selected object insertion order" \
-command { xschem change_elem_order -1 } -accelerator Shift+S
$topwin.menubar.prop.menu add command -label "Edit Header/License text" \
-command { update_schematic_header } -accelerator Shift+B
$topwin.menubar.prop.menu add command -background red -label "Edit file (danger!)" \