add Esc binding for closing view data dialogs. Add no_ask_simulate variable to avoid asking confirmation to simulate
This commit is contained in:
parent
d6d39bdb5f
commit
3b08bf8f7c
|
|
@ -3308,14 +3308,15 @@ static void handle_key_press(int event, KeySym key, int state, int rstate, int m
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if((rstate == ControlMask) && cadence_compat) { /* simulate (for cadence users) */
|
else if((rstate == ControlMask) && cadence_compat) { /* simulate (for cadence users) */
|
||||||
|
int noask = tclgetboolvar("no_ask_simulate");
|
||||||
if(xctx->semaphore >= 2) break;
|
if(xctx->semaphore >= 2) break;
|
||||||
if(waves_selected(event, key, state, button)) {
|
if(waves_selected(event, key, state, button)) {
|
||||||
waves_callback(event, mx, my, key, button, aux, state);
|
waves_callback(event, mx, my, key, button, aux, state);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tcleval("tk_messageBox -type okcancel -parent [xschem get topwindow] "
|
if(!noask) tcleval("tk_messageBox -type okcancel -parent [xschem get topwindow] "
|
||||||
"-message {Run circuit simulation?}");
|
"-message {Run circuit simulation?}");
|
||||||
if(strcmp(tclresult(),"ok")==0) {
|
if(noask || strcmp(tclresult(),"ok")==0) {
|
||||||
tcleval("[xschem get top_path].menubar invoke Simulate");
|
tcleval("[xschem get top_path].menubar invoke Simulate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3351,14 +3352,15 @@ static void handle_key_press(int event, KeySym key, int state, int rstate, int m
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
if((rstate == 0) && !cadence_compat) { /* simulate (original keybind) */
|
if((rstate == 0) && !cadence_compat) { /* simulate (original keybind) */
|
||||||
|
int noask = tclgetboolvar("no_ask_simulate");
|
||||||
if(xctx->semaphore >= 2) break;
|
if(xctx->semaphore >= 2) break;
|
||||||
if(waves_selected(event, key, state, button)) {
|
if(waves_selected(event, key, state, button)) {
|
||||||
waves_callback(event, mx, my, key, button, aux, state);
|
waves_callback(event, mx, my, key, button, aux, state);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tcleval("tk_messageBox -type okcancel -parent [xschem get topwindow] "
|
if(!noask) tcleval("tk_messageBox -type okcancel -parent [xschem get topwindow] "
|
||||||
"-message {Run circuit simulation?}");
|
"-message {Run circuit simulation?}");
|
||||||
if(strcmp(tclresult(),"ok")==0) {
|
if(noask || strcmp(tclresult(),"ok")==0) {
|
||||||
tcleval("[xschem get top_path].menubar invoke Simulate");
|
tcleval("[xschem get top_path].menubar invoke Simulate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7015,6 +7015,7 @@ proc viewdata {data {ro {}} {win .view}} {
|
||||||
pack $viewdata_w.xscroll -side bottom -fill x
|
pack $viewdata_w.xscroll -side bottom -fill x
|
||||||
# 20171103 insert at insertion cursor(insert tag) instead of 0.0
|
# 20171103 insert at insertion cursor(insert tag) instead of 0.0
|
||||||
$viewdata_w.text insert insert $data
|
$viewdata_w.text insert insert $data
|
||||||
|
bind $viewdata_w <Escape> "$viewdata_w.buttons.dismiss invoke"
|
||||||
return $tctx::rcode
|
return $tctx::rcode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -8395,7 +8396,7 @@ set tctx::global_list {
|
||||||
hide_symbols incr_hilight incremental_select infix_interface infowindow_text intuitive_interface
|
hide_symbols incr_hilight incremental_select infix_interface infowindow_text intuitive_interface
|
||||||
keep_symbols launcher_default_program light_colors line_width live_cursor2_backannotate
|
keep_symbols launcher_default_program light_colors line_width live_cursor2_backannotate
|
||||||
local_netlist_dir lvs_ignore lvs_netlist measure_text netlist_dir netlist_show netlist_type
|
local_netlist_dir lvs_ignore lvs_netlist measure_text netlist_dir netlist_show netlist_type
|
||||||
no_ask_save no_change_attrs nolist_libs noprint_libs old_selected_tok only_probes
|
no_ask_save no_ask_simulate no_change_attrs nolist_libs noprint_libs old_selected_tok only_probes
|
||||||
orthogonal_wiring path pathlist persistent_command preserve_unchanged_attrs prev_symbol ps_colors
|
orthogonal_wiring path pathlist persistent_command preserve_unchanged_attrs prev_symbol ps_colors
|
||||||
ps_paper_size rainbow_colors recentfile retval retval_orig rotated_text search_case search_exact
|
ps_paper_size rainbow_colors recentfile retval retval_orig rotated_text search_case search_exact
|
||||||
search_found search_schematic search_select search_value select_touch selected_tok
|
search_found search_schematic search_select search_value select_touch selected_tok
|
||||||
|
|
@ -9985,6 +9986,7 @@ set_ne sym_txt 1
|
||||||
set_ne show_infowindow 0
|
set_ne show_infowindow 0
|
||||||
set_ne show_infowindow_after_netlist onerror
|
set_ne show_infowindow_after_netlist onerror
|
||||||
set_ne no_ask_save 0 ;# if set to 1 ctrl-s (save) will not ask to save
|
set_ne no_ask_save 0 ;# if set to 1 ctrl-s (save) will not ask to save
|
||||||
|
set_ne no_ask_simulate 0 ;# if set to 1 no confirmation for simulation ('s')
|
||||||
set_ne symbol_width 150
|
set_ne symbol_width 150
|
||||||
set_ne editor {gvim -f}
|
set_ne editor {gvim -f}
|
||||||
set_ne rainbow_colors 0
|
set_ne rainbow_colors 0
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,11 @@
|
||||||
|
|
||||||
#### do not ask to save file when doing control-s or File -> Save
|
#### do not ask to save file when doing control-s or File -> Save
|
||||||
#### default: disabled (0), will ask before saving.
|
#### default: disabled (0), will ask before saving.
|
||||||
# set no_ask_save 0
|
# set no_ask_save 1
|
||||||
|
|
||||||
|
#### do not ask confirmation to simulate when presing 's'
|
||||||
|
#### default: disabled (0), will ask confirmation.
|
||||||
|
# set no_ask_simulate 1
|
||||||
|
|
||||||
#### set widget scaling (mainly for font display), this is useful on 4K displays
|
#### set widget scaling (mainly for font display), this is useful on 4K displays
|
||||||
#### default: unset (tk uses its default) > 1.0 ==> bigger
|
#### default: unset (tk uses its default) > 1.0 ==> bigger
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue