improve quit_xschem command and xschem new_schematic destroy_all
This commit is contained in:
parent
37a5dcee95
commit
3eeaf53cd4
|
|
@ -2265,6 +2265,8 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
* destroy: destroy tab/window identified by winpath. Example:
|
||||
* xschem new_schematic destroy .x1.drw
|
||||
* destroy_all: close all tabs/additional windows
|
||||
* if the 'force'argument is given do not issue a warning if modified
|
||||
* tabs are about to be closed.
|
||||
* switch: switch context to specified 'winpath' window or specified schematic name
|
||||
* Main window/tab has winpath set to .drw,
|
||||
* Additional windows/tabs have winpath set to .x1.drw, .x2.drw and so on...
|
||||
|
|
|
|||
|
|
@ -1872,9 +1872,9 @@ int new_schematic(const char *what, const char *win_path, const char *fname)
|
|||
}
|
||||
} else if(!strcmp(what, "destroy_all")) {
|
||||
if(!tabbed_interface) {
|
||||
destroy_all_windows(&window_count, win_path ? 1 : 0);
|
||||
destroy_all_windows(&window_count, (win_path && win_path[0]) ? 1 : 0);
|
||||
} else {
|
||||
destroy_all_tabs(&window_count, win_path ? 1 : 0);
|
||||
destroy_all_tabs(&window_count, (win_path && win_path[0]) ? 1 : 0);
|
||||
}
|
||||
} else if(!strcmp(what, "switch")) {
|
||||
if(tabbed_interface) switch_tab(&window_count, win_path);
|
||||
|
|
|
|||
|
|
@ -5365,22 +5365,13 @@ proc set_tab_names {{mod {}}} {
|
|||
}
|
||||
}
|
||||
|
||||
proc quit_xschem {} {
|
||||
proc quit_xschem { {force {}}} {
|
||||
global tabbed_interface
|
||||
|
||||
set remaining [xschem new_schematic destroy_all]
|
||||
if {$tabbed_interface != 1} {
|
||||
if {$remaining == 0 } {
|
||||
save_ctx [xschem get current_win_path]
|
||||
restore_ctx .drw
|
||||
xschem new_schematic switch .drw
|
||||
housekeeping_ctx
|
||||
xschem exit closewindow
|
||||
}
|
||||
} else {
|
||||
xschem new_schematic switch .drw
|
||||
xschem exit closewindow
|
||||
}
|
||||
xschem new_schematic destroy_all $force
|
||||
xschem new_schematic switch .drw
|
||||
set remaining [xschem exit closewindow $force]
|
||||
return $remaining
|
||||
}
|
||||
|
||||
proc raise_dialog {parent window_path } {
|
||||
|
|
@ -5464,7 +5455,8 @@ set tctx::global_list {
|
|||
add_all_windows_drives auto_hilight autofocus_mainwindow
|
||||
autotrim_wires bespice_listen_port big_grid_points bus_replacement_char cadgrid cadlayers
|
||||
cadsnap cairo_font_name change_lw color_ps colors compare_sch connect_by_kissing constrained_move
|
||||
copy_cell custom_label_prefix custom_token dark_colors dark_colorscheme dim_bg dim_value
|
||||
copy_cell custom_label_prefix custom_token dark_colors dark_colorscheme
|
||||
delay_flag dim_bg dim_value
|
||||
disable_unique_names do_all_inst draw_grid draw_window edit_prop_pos edit_prop_size
|
||||
edit_symbol_prop_new_sel editprop_sympath en_hilight_conn_inst enable_dim_bg enable_stretch
|
||||
filetmp flat_netlist fullscreen gaw_fd gaw_tcp_address graph_bus graph_digital
|
||||
|
|
|
|||
Loading…
Reference in New Issue