From 01e074424406125d6bad26eca3edd8cd1ceae52c Mon Sep 17 00:00:00 2001 From: Chayan Deb Date: Mon, 3 Feb 2025 12:32:09 +0530 Subject: [PATCH 1/2] Fixed and re-enabled 'end-wire when user drags mouse cursor from an instance pin'. This feature was introduced from upstream repo and was previously disabled to prevent a bug that occurred in 'orthogonal_wiring' mode. --- src/callback.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/callback.c b/src/callback.c index 8d612530..a730440c 100644 --- a/src/callback.c +++ b/src/callback.c @@ -4519,10 +4519,10 @@ int rstate; /* (reduced state, without ShiftMask) */ } /* end wire creation when dragging in intuitive interface from an inst pin ow wire endpoint */ - /*else if(state == Button1Mask && xctx->intuitive_interface - * && (xctx->ui_state & STARTWIRE) && !(xctx->ui_state & MENUSTART)) {*/ - /* if(end_place_move_copy_zoom()) break;*/ - /*}*/ + else if(state == Button1Mask && xctx->intuitive_interface && !tclgetboolvar("persistent_command") + && (xctx->ui_state & STARTWIRE) && !(xctx->ui_state & MENUSTART)) { + if(end_place_move_copy_zoom()) break; + } /* end intuitive_interface copy or move */ if(xctx->ui_state & STARTCOPY && xctx->drag_elements) { From 2349134a86d9c8dd4e48ba84d43cbe4d120bb3ea Mon Sep 17 00:00:00 2001 From: Chayan Deb Date: Mon, 3 Feb 2025 13:01:11 +0530 Subject: [PATCH 2/2] Lock old behavior of 'Esc'-keypress during persistent_command is active, behind the newly added TCL-option 'cadence_compat'. Wire drawing mode will now take two 'Esc' keypresses to clear, but if 'cadence_compat' is enabled, it will only take one. --- src/callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/callback.c b/src/callback.c index a730440c..06c50123 100644 --- a/src/callback.c +++ b/src/callback.c @@ -3003,7 +3003,7 @@ int rstate; /* (reduced state, without ShiftMask) */ if(xctx->ui_state2 & MENUSTARTWIRE) { xctx->ui_state2 &= ~MENUSTARTWIRE; } - if(tclgetboolvar("persistent_command") && (xctx->last_command & STARTWIRE)) { + if(tclgetboolvar("persistent_command") && (xctx->last_command & STARTWIRE) && cadence_compat) { xctx->last_command &= ~STARTWIRE; if(snap_cursor) draw_snap_cursor(1); }