redraw schematic when switching netlisting mode (Shift-V) to redraw disabled/enabled components for the new netlisting mode; The Properties->Toggle *_ignore... menu will do nothing if in symbol netlisting mode
This commit is contained in:
parent
608a144dd1
commit
694bc631a0
|
|
@ -1656,6 +1656,7 @@ int callback(const char *winpath, int event, int mx, int my, KeySym key,
|
|||
{
|
||||
xctx->netlist_type++; if(xctx->netlist_type==6) xctx->netlist_type=1;
|
||||
set_tcl_netlist_type();
|
||||
draw(); /* needed to ungrey or grey out components due to *_ignore attribute */
|
||||
break;
|
||||
}
|
||||
if(key=='s' && (state == 0) ) /* simulate */
|
||||
|
|
|
|||
|
|
@ -3717,27 +3717,30 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
if(xctx->netlist_type == CAD_VERILOG_NETLIST) attr="verilog_ignore";
|
||||
else if(xctx->netlist_type == CAD_VHDL_NETLIST) attr="vhdl_ignore";
|
||||
else if(xctx->netlist_type == CAD_TEDAX_NETLIST) attr="tedax_ignore";
|
||||
else attr="spice_ignore";
|
||||
rebuild_selected_array();
|
||||
for(n=0; n < xctx->lastsel; ++n) {
|
||||
if(xctx->sel_array[n].type == ELEMENT) {
|
||||
i = xctx->sel_array[n].n;
|
||||
if(first) {
|
||||
xctx->push_undo();
|
||||
first = 0;
|
||||
else if(xctx->netlist_type == CAD_SPICE_NETLIST) attr="spice_ignore";
|
||||
else attr = NULL;
|
||||
if(attr) {
|
||||
rebuild_selected_array();
|
||||
for(n=0; n < xctx->lastsel; ++n) {
|
||||
if(xctx->sel_array[n].type == ELEMENT) {
|
||||
i = xctx->sel_array[n].n;
|
||||
if(first) {
|
||||
xctx->push_undo();
|
||||
first = 0;
|
||||
}
|
||||
remove = 0;
|
||||
if(!strcmp(get_tok_value(xctx->inst[i].prop_ptr, attr, 0), "true")) remove = 1;
|
||||
if(remove) {
|
||||
my_strdup(_ALLOC_ID_, &xctx->inst[i].prop_ptr, subst_token(xctx->inst[i].prop_ptr, attr, NULL));
|
||||
} else {
|
||||
my_strdup(_ALLOC_ID_, &xctx->inst[i].prop_ptr, subst_token(xctx->inst[i].prop_ptr, attr, "true"));
|
||||
}
|
||||
set_inst_flags(&xctx->inst[i]);
|
||||
set_modify(1);
|
||||
}
|
||||
remove = 0;
|
||||
if(!strcmp(get_tok_value(xctx->inst[i].prop_ptr, attr, 0), "true")) remove = 1;
|
||||
if(remove) {
|
||||
my_strdup(_ALLOC_ID_, &xctx->inst[i].prop_ptr, subst_token(xctx->inst[i].prop_ptr, attr, NULL));
|
||||
} else {
|
||||
my_strdup(_ALLOC_ID_, &xctx->inst[i].prop_ptr, subst_token(xctx->inst[i].prop_ptr, attr, "true"));
|
||||
}
|
||||
set_inst_flags(&xctx->inst[i]);
|
||||
set_modify(1);
|
||||
}
|
||||
draw();
|
||||
}
|
||||
draw();
|
||||
Tcl_ResetResult(interp);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5889,19 +5889,19 @@ proc build_widgets { {topwin {} } } {
|
|||
$topwin.menubar.option.menu add separator
|
||||
$topwin.menubar.option.menu add radiobutton -label "Spice netlist" -variable netlist_type -value spice \
|
||||
-accelerator {Shift+V} \
|
||||
-command "xschem set netlist_type spice"
|
||||
-command "xschem set netlist_type spice; xschem redraw"
|
||||
$topwin.menubar.option.menu add radiobutton -label "VHDL netlist" -variable netlist_type -value vhdl \
|
||||
-accelerator {Shift+V} \
|
||||
-command "xschem set netlist_type vhdl"
|
||||
-command "xschem set netlist_type vhdl; xschem redraw"
|
||||
$topwin.menubar.option.menu add radiobutton -label "Verilog netlist" -variable netlist_type -value verilog \
|
||||
-accelerator {Shift+V} \
|
||||
-command "xschem set netlist_type verilog"
|
||||
-command "xschem set netlist_type verilog; xschem redraw"
|
||||
$topwin.menubar.option.menu add radiobutton -label "tEDAx netlist" -variable netlist_type -value tedax \
|
||||
-accelerator {Shift+V} \
|
||||
-command "xschem set netlist_type tedax"
|
||||
-command "xschem set netlist_type tedax; xschem redraw"
|
||||
$topwin.menubar.option.menu add radiobutton -label "Symbol global attrs" -variable netlist_type -value symbol \
|
||||
-accelerator {Shift+V} \
|
||||
-command "xschem set netlist_type symbol"
|
||||
-command "xschem set netlist_type symbol; xschem redraw"
|
||||
$topwin.menubar.edit.menu add command -label "Undo" -command "xschem undo; xschem redraw" -accelerator U
|
||||
toolbar_add EditUndo "xschem undo; xschem redraw" "Undo" $topwin
|
||||
$topwin.menubar.edit.menu add command -label "Redo" -command "xschem redo; xschem redraw" -accelerator {Shift+U}
|
||||
|
|
|
|||
Loading…
Reference in New Issue