From 3a412e8e6ffbccc3d1ac3ab6306e6dd3dc673afc Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Sat, 9 Mar 2024 06:08:22 +0100 Subject: [PATCH] fix redundant push_undo() in drag_elements --- src/callback.c | 2 +- src/move.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/callback.c b/src/callback.c index a9bd4ad7..05ea1709 100644 --- a/src/callback.c +++ b/src/callback.c @@ -3522,7 +3522,7 @@ int rstate; /* (reduced state, without ShiftMask) */ /* intuitive interface: directly drag elements */ if(sel.type && xctx->intuitive_interface && xctx->lastsel >= 1 && !xctx->shape_point_selected) { - xctx->push_undo(); + /* xctx->push_undo(); */ xctx->drag_elements = 1; if( state & ControlMask && !tclgetboolvar("enable_stretch")) { diff --git a/src/move.c b/src/move.c index 926a6800..715e9347 100644 --- a/src/move.c +++ b/src/move.c @@ -558,7 +558,7 @@ void copy_objects(int what) newpropcnt=0; - if( !xctx->kissing && !xctx->drag_elements) { + if( !xctx->kissing ) { dbg(1, "copy_objects(): push undo state\n"); xctx->push_undo(); } @@ -955,7 +955,7 @@ void move_objects(int what, int merge, double dx, double dy) xctx->paste_from = 0; /* end of a paste from clipboard command */ if(xctx->connect_by_kissing == 2) xctx->connect_by_kissing = 0; /* no undo push for MERGE ad PLACE and polygon point drag, already done before */ - if(!xctx->shape_point_selected && !xctx->kissing && !xctx->drag_elements && + if(!xctx->shape_point_selected && !xctx->kissing && !(xctx->ui_state & (STARTMERGE | PLACE_SYMBOL | PLACE_TEXT)) ) { dbg(1, "move_objects(END): push undo state\n"); xctx->push_undo();