fix redundant push_undo() in shape_point_selected ops

This commit is contained in:
stefan schippers 2024-03-09 06:16:41 +01:00
parent 3a412e8e6f
commit a855f732c9
3 changed files with 6 additions and 6 deletions

View File

@ -1351,7 +1351,7 @@ static int edit_line_point(int state)
if(xctx->shape_point_selected) {
/* move one lineangle selected point */
if(!(state & (ControlMask | ShiftMask))){
xctx->push_undo();
/* xctx->push_undo(); */
move_objects(START,0,0,0);
return 1;
}
@ -1383,7 +1383,7 @@ static int edit_wire_point(int state)
if(xctx->shape_point_selected) {
/* move one wire selected point */
if(!(state & (ControlMask | ShiftMask))){
xctx->push_undo();
/* xctx->push_undo(); */
move_objects(START,0,0,0);
return 1;
}
@ -1424,7 +1424,7 @@ static int edit_rect_point(int state)
if(xctx->shape_point_selected) {
/* move one rectangle selected point */
if(!(state & (ControlMask | ShiftMask))){
xctx->push_undo();
/* xctx->push_undo(); */
move_objects(START,0,0,0);
return 1;
}
@ -1502,7 +1502,7 @@ static int edit_polygon_point(int state)
return 1;
/* move one polygon/bezier selected point */
} else if(!(state & (ControlMask | ShiftMask))){
xctx->push_undo();
/* xctx->push_undo(); */
p->sel = SELECTED1;
move_objects(START,0,0,0);
return 1;

View File

@ -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 &&
if(!xctx->kissing &&
!(xctx->ui_state & (STARTMERGE | PLACE_SYMBOL | PLACE_TEXT)) ) {
dbg(1, "move_objects(END): push undo state\n");
xctx->push_undo();

View File

@ -3255,7 +3255,7 @@ void push_undo(void)
char diff_name[PATH_MAX+100]; /* overflow safe 20161122 */
if(xctx->no_undo)return;
dbg(1, "push_undo(): cur_undo_ptr=%d tail_undo_ptr=%d head_undo_ptr=%d\n",
dbg(0, "push_undo(): cur_undo_ptr=%d tail_undo_ptr=%d head_undo_ptr=%d\n",
xctx->cur_undo_ptr, xctx->tail_undo_ptr, xctx->head_undo_ptr);
init_undo();
#if HAS_POPEN==1