diff --git a/src/callback.c b/src/callback.c index 6c1a6f5a..7a1202c3 100644 --- a/src/callback.c +++ b/src/callback.c @@ -2611,13 +2611,17 @@ int rstate; /* (reduced state, without ShiftMask) */ { int prev_state = xctx->ui_state; if(xctx->semaphore >= 2) break; - if(prev_state == STARTWIRE) { + if(tclgetboolvar("infix_wire")) { start_wire(xctx->mousex_snap, xctx->mousey_snap); - tcleval("set constr_mv 0" ); - xctx->constr_mv=0; - } else{ + } else if(prev_state == STARTWIRE) { + start_wire(xctx->mousex_snap, xctx->mousey_snap); + } else { tcleval("xschem wire"); } + if(prev_state == STARTWIRE) { + tcleval("set constr_mv 0"); + xctx->constr_mv = 0; + } break; } if(key == XK_Return && (state == 0 ) && xctx->ui_state & STARTPOLYGON) { /* close polygon */ diff --git a/src/xschem.tcl b/src/xschem.tcl index f4adc72c..10002cd6 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -7478,7 +7478,7 @@ set tctx::global_list { PDK_ROOT PDK SKYWATER_MODELS SKYWATER_STDCELLS INITIALINSTDIR INITIALLOADDIR INITIALPROPDIR INITIALTEXTDIR XSCHEM_LIBRARY_PATH 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 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 @@ -7899,7 +7899,7 @@ proc build_widgets { {topwin {} } } { 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 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 if { $dark_gui_colorscheme} { set selectcolor white @@ -8022,6 +8022,8 @@ proc build_widgets { {topwin {} } } { -onvalue disk -offvalue memory -command {switch_undo} $topwin.menubar.option add checkbutton -label "Enable stretch" -variable enable_stretch \ -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" \ -selectcolor $selectcolor -variable unselect_partial_sel_wires @@ -8938,6 +8940,7 @@ set_ne draw_grid_axes 1 set_ne persistent_command 0 set_ne intuitive_interface 1 set_ne autotrim_wires 0 +set_ne infix_wire 0 set_ne compare_sch 0 set_ne disable_unique_names 0 set_ne sym_txt 1 diff --git a/src/xschemrc b/src/xschemrc index a31096bd..fa6f7363 100644 --- a/src/xschemrc +++ b/src/xschemrc @@ -221,6 +221,11 @@ #### if not set show selected items at end of drag. Default: enabled (1) # 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 #### this may slow down on rally big designs. Can be disabled via menu #### default: 0