[Added New Feature]: New menu option 'Enable infix wire' is now accessible through the 'Options' menu. This option is turned-off by default and can be enabled anytime through the menu or the 'xschemrc' file to make xschem-editor revert back to it's old behavior, prior to commit 96c3dde250

This commit is contained in:
Chayan Deb 2025-01-02 20:03:42 +05:30
parent 6e886ff448
commit 052d7e8793
3 changed files with 18 additions and 6 deletions

View File

@ -2611,13 +2611,17 @@ int rstate; /* (reduced state, without ShiftMask) */
{ {
int prev_state = xctx->ui_state; int prev_state = xctx->ui_state;
if(xctx->semaphore >= 2) break; if(xctx->semaphore >= 2) break;
if(prev_state == STARTWIRE) { if(tclgetboolvar("infix_wire")) {
start_wire(xctx->mousex_snap, xctx->mousey_snap); start_wire(xctx->mousex_snap, xctx->mousey_snap);
tcleval("set constr_mv 0" ); } else if(prev_state == STARTWIRE) {
xctx->constr_mv=0; start_wire(xctx->mousex_snap, xctx->mousey_snap);
} else{ } else {
tcleval("xschem wire"); tcleval("xschem wire");
} }
if(prev_state == STARTWIRE) {
tcleval("set constr_mv 0");
xctx->constr_mv = 0;
}
break; break;
} }
if(key == XK_Return && (state == 0 ) && xctx->ui_state & STARTPOLYGON) { /* close polygon */ if(key == XK_Return && (state == 0 ) && xctx->ui_state & STARTPOLYGON) { /* close polygon */

View File

@ -7478,7 +7478,7 @@ set tctx::global_list {
PDK_ROOT PDK SKYWATER_MODELS SKYWATER_STDCELLS PDK_ROOT PDK SKYWATER_MODELS SKYWATER_STDCELLS
INITIALINSTDIR INITIALLOADDIR INITIALPROPDIR INITIALTEXTDIR XSCHEM_LIBRARY_PATH INITIALINSTDIR INITIALLOADDIR INITIALPROPDIR INITIALTEXTDIR XSCHEM_LIBRARY_PATH
add_all_windows_drives auto_hilight auto_hilight_graph_nodes autofocus_mainwindow add_all_windows_drives auto_hilight auto_hilight_graph_nodes autofocus_mainwindow
autotrim_wires bespice_listen_port big_grid_points bus_replacement_char cadgrid cadlayers autotrim_wires infix_wire bespice_listen_port big_grid_points bus_replacement_char cadgrid cadlayers
cadsnap cairo_font_name cairo_font_scale change_lw color_ps tctx::colors compare_sch constr_mv cadsnap cairo_font_name cairo_font_scale change_lw color_ps tctx::colors compare_sch constr_mv
copy_cell crosshair_layer custom_label_prefix custom_token dark_colors dark_colorscheme copy_cell crosshair_layer custom_label_prefix custom_token dark_colors dark_colorscheme
dark_gui_colorscheme delay_flag dim_bg dim_value disable_unique_names dark_gui_colorscheme delay_flag dim_bg dim_value disable_unique_names
@ -7899,7 +7899,7 @@ proc build_widgets { {topwin {} } } {
global netlist_show flat_netlist split_files compare_sch intuitive_interface global netlist_show flat_netlist split_files compare_sch intuitive_interface
global draw_grid big_grid_points sym_txt change_lw incr_hilight symbol_width global draw_grid big_grid_points sym_txt change_lw incr_hilight symbol_width
global cadsnap cadgrid draw_window toolbar_visible hide_symbols undo_type global cadsnap cadgrid draw_window toolbar_visible hide_symbols undo_type
global disable_unique_names persistent_command autotrim_wires en_hilight_conn_inst global disable_unique_names persistent_command autotrim_wires infix_wire en_hilight_conn_inst
global local_netlist_dir editor netlist_type netlist_dir spiceprefix initial_geometry global local_netlist_dir editor netlist_type netlist_dir spiceprefix initial_geometry
if { $dark_gui_colorscheme} { if { $dark_gui_colorscheme} {
set selectcolor white set selectcolor white
@ -8022,6 +8022,8 @@ proc build_widgets { {topwin {} } } {
-onvalue disk -offvalue memory -command {switch_undo} -onvalue disk -offvalue memory -command {switch_undo}
$topwin.menubar.option add checkbutton -label "Enable stretch" -variable enable_stretch \ $topwin.menubar.option add checkbutton -label "Enable stretch" -variable enable_stretch \
-selectcolor $selectcolor -accelerator Y -selectcolor $selectcolor -accelerator Y
$topwin.menubar.option add checkbutton -label "Enable infix-wire" -variable infix_wire \
-selectcolor $selectcolor
$topwin.menubar.option add checkbutton -label "Unsel. partial sel. wires after stretch move" \ $topwin.menubar.option add checkbutton -label "Unsel. partial sel. wires after stretch move" \
-selectcolor $selectcolor -variable unselect_partial_sel_wires -selectcolor $selectcolor -variable unselect_partial_sel_wires
@ -8938,6 +8940,7 @@ set_ne draw_grid_axes 1
set_ne persistent_command 0 set_ne persistent_command 0
set_ne intuitive_interface 1 set_ne intuitive_interface 1
set_ne autotrim_wires 0 set_ne autotrim_wires 0
set_ne infix_wire 0
set_ne compare_sch 0 set_ne compare_sch 0
set_ne disable_unique_names 0 set_ne disable_unique_names 0
set_ne sym_txt 1 set_ne sym_txt 1

View File

@ -221,6 +221,11 @@
#### if not set show selected items at end of drag. Default: enabled (1) #### if not set show selected items at end of drag. Default: enabled (1)
# set incremental_select 0 # set incremental_select 0
#### if set to 1, pressing 'w' will immediately place a wire at current cursor
#### position without waiting for Button1 (LMB) click. Can be disabled via menu
#### default: 0
# set infix_wire 1
#### if set to 1 automatically join/trim wires while editing #### if set to 1 automatically join/trim wires while editing
#### this may slow down on rally big designs. Can be disabled via menu #### this may slow down on rally big designs. Can be disabled via menu
#### default: 0 #### default: 0