fix redundant push_undo() in drag_elements

This commit is contained in:
stefan schippers 2024-03-09 06:08:22 +01:00
parent 2505ffe594
commit 3a412e8e6f
2 changed files with 3 additions and 3 deletions

View File

@ -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")) {

View File

@ -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();