[Bugfix]: Fixed a bug where drawing a wire in an empty canvas caused the snap-cursor to detect it's own endpoint as a snap-point and incorrectly terminate wire-drawing mode
This commit is contained in:
parent
935696ef81
commit
0a0ef228fe
|
|
@ -4230,9 +4230,10 @@ int rstate; /* (reduced state, without ShiftMask) */
|
|||
if(tclgetboolvar("persistent_command") && xctx->last_command) {
|
||||
if(xctx->last_command == STARTLINE) start_line(xctx->mousex_snap, xctx->mousey_snap);
|
||||
if(xctx->last_command == STARTWIRE){
|
||||
if(tclgetboolvar("snap_cursor") && (xctx->prev_snapx == xctx->mousex_snap && xctx->prev_snapy == xctx->mousey_snap)){
|
||||
if(tclgetboolvar("snap_cursor") && (xctx->prev_snapx == xctx->mousex_snap && xctx->prev_snapy == xctx->mousey_snap)
|
||||
&& (xctx->ui_state & STARTWIRE)){
|
||||
new_wire(PLACE|END, xctx->mousex_snap, xctx->mousey_snap);
|
||||
xctx->last_command &= ~STARTWIRE;
|
||||
xctx->ui_state &= ~STARTWIRE;
|
||||
}
|
||||
else
|
||||
start_wire(xctx->mousex_snap, xctx->mousey_snap);
|
||||
|
|
|
|||
Loading…
Reference in New Issue