redraw screen if executing `xschem raw_read` (and raw file already loaded, thus unloading waves)

This commit is contained in:
stefan schippers 2023-10-29 12:54:55 +01:00
parent a19020ed78
commit b680f5da20
3 changed files with 14 additions and 14 deletions

View File

@ -674,12 +674,13 @@ void free_rawfile(Raw **rawptr, int dr)
int i; int i;
Raw *raw; Raw *raw;
int deleted = 0; if(!rawptr || !*rawptr) {
if(!rawptr || !*rawptr) return; if(dr) draw();
return;
}
raw = *rawptr; raw = *rawptr;
dbg(1, "free_rawfile(): clearing data\n"); dbg(0, "free_rawfile(): clearing data\n");
if(raw->names) { if(raw->names) {
deleted = 1;
for(i = 0 ; i < raw->nvars; ++i) { for(i = 0 ; i < raw->nvars; ++i) {
my_free(_ALLOC_ID_, &raw->names[i]); my_free(_ALLOC_ID_, &raw->names[i]);
} }
@ -687,7 +688,6 @@ void free_rawfile(Raw **rawptr, int dr)
my_free(_ALLOC_ID_, &raw->cursor_b_val); my_free(_ALLOC_ID_, &raw->cursor_b_val);
} }
if(raw->values) { if(raw->values) {
deleted = 1;
/* free also extra column for custom data plots */ /* free also extra column for custom data plots */
for(i = 0 ; i <= raw->nvars; ++i) { for(i = 0 ; i <= raw->nvars; ++i) {
my_free(_ALLOC_ID_, &raw->values[i]); my_free(_ALLOC_ID_, &raw->values[i]);
@ -700,7 +700,7 @@ void free_rawfile(Raw **rawptr, int dr)
if(raw->schname) my_free(_ALLOC_ID_, &raw->schname); if(raw->schname) my_free(_ALLOC_ID_, &raw->schname);
if(raw->table.table) int_hash_free(&raw->table); if(raw->table.table) int_hash_free(&raw->table);
my_free(_ALLOC_ID_, rawptr); my_free(_ALLOC_ID_, rawptr);
if(deleted && dr) draw(); if(dr) draw();
} }
/* caller must free returned pointer */ /* caller must free returned pointer */

View File

@ -6791,6 +6791,12 @@ proc build_widgets { {topwin {} } } {
-command {xschem update_all_sym_bboxes; xschem redraw} -command {xschem update_all_sym_bboxes; xschem redraw}
$topwin.menubar.view.menu.show add checkbutton -label "Draw grid axes" -variable draw_grid_axes \ $topwin.menubar.view.menu.show add checkbutton -label "Draw grid axes" -variable draw_grid_axes \
-command {xschem redraw} -command {xschem redraw}
$topwin.menubar.view.menu.show add checkbutton -label "Show net names on symbol pins/floaters" \
-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" -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 "Edit with editor" -command "xschem edit_vi_prop" -accelerator Shift+Q
@ -6810,12 +6816,6 @@ proc build_widgets { {topwin {} } } {
$topwin.menubar.sym.menu add radiobutton -label "Show instance Bounding boxes for all symbols" \ $topwin.menubar.sym.menu add radiobutton -label "Show instance Bounding boxes for all symbols" \
-variable hide_symbols -value 2 \ -variable hide_symbols -value 2 \
-command {xschem set hide_symbols $hide_symbols; xschem redraw} -accelerator Alt+B -command {xschem set hide_symbols $hide_symbols; xschem redraw} -accelerator Alt+B
$topwin.menubar.sym.menu add checkbutton -label "Show net names on symbol pins/floaters" \
-variable show_pin_net_names \
-command {
xschem update_all_sym_bboxes
xschem redraw
}
$topwin.menubar.sym.menu add command -label "Set symbol width" \ $topwin.menubar.sym.menu add command -label "Set symbol width" \
-command { -command {
input_line "Enter Symbol width ($symbol_width)" "set symbol_width" $symbol_width input_line "Enter Symbol width ($symbol_width)" "set symbol_width" $symbol_width

View File

@ -1,4 +1,4 @@
v {xschem version=3.4.4 file_version=1.2 v {xschem version=3.4.5 file_version=1.2
* *
* This file is part of XSCHEM, * This file is part of XSCHEM,
* a schematic capture and Spice/Vhdl/Verilog netlisting tool for circuit * a schematic capture and Spice/Vhdl/Verilog netlisting tool for circuit
@ -20,7 +20,7 @@ v {xschem version=3.4.4 file_version=1.2
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
} }
G {} G {}
K {type=show_label K {type=short
template="name=x1 value=0.1" template="name=x1 value=0.1"
format="* short @name : @#0:net_name <--> @#1:net_name" format="* short @name : @#0:net_name <--> @#1:net_name"
highlight=true} highlight=true}