From a737e53be43e5bf3c0ef3bf53b995945c6ef5d76 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Sat, 19 Dec 2020 23:21:47 +0100 Subject: [PATCH] after a paste schematic / ctrl-v leave ui_state to SELECTION so objects can be deleted without having to re-select them --- src/move.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/move.c b/src/move.c index f49ae2fc..4422fdb4 100644 --- a/src/move.c +++ b/src/move.c @@ -1049,9 +1049,9 @@ void move_objects(int what, int merge, double dx, double dy) draw_selection(xctx->gctiled,0); bbox(START, 0.0 , 0.0 , 0.0 , 0.0); set_modify(1); - if( !(xctx->ui_state & (STARTMERGE | PLACE_SYMBOL)) ) { + if( !(xctx->ui_state & (STARTMERGE | PLACE_SYMBOL)) ) { /* no undo push for MERGE ad PLACE, already done before */ dbg(1, "move_objects(): push undo state\n"); - push_undo(); /* 20150327 push_undo */ + push_undo(); } xctx->ui_state &= ~PLACE_SYMBOL; if(dx!=0.0 || dy!=0.0) { @@ -1484,6 +1484,7 @@ void move_objects(int what, int merge, double dx, double dy) check_collapsing_objects(); update_conn_cues(1, 1); xctx->ui_state &= ~STARTMOVE; + if(xctx->ui_state & STARTMERGE) xctx->ui_state |= SELECTION; /* leave selection state so objects can be deleted */ xctx->ui_state &= ~STARTMERGE; xctx->x1=xctx->y_1=xctx->x2=xctx->y_2=xctx->move_rot=xctx->move_flip=xctx->deltax=xctx->deltay=0; bbox(SET , 0.0 , 0.0 , 0.0 , 0.0);