IsmAvatar/LateralGM

Instance/Tile Selection Creates Empty Undo

Closed this issue · 1 comments

Very simple, open an existing room and just select an instance or tile with the mouse. Click inside the room to select, it does not reproduce by selecting from the instance or tile list. An undo will become instantly available, even if the instance or tile is not moved. Activating the undo seems to do nothing and redoing it has no effect either. This does not appear to be a regression and exists in 1.8.5 where the room editor undo was first introduced.

It's storing an empty move undo because we are not using MOUSE_DRAGGED for the movement. Selecting the piece causes it to be moved to where it already is. We also don't compare the position with the original position to see if the piece was actually moved and changed positions.

edit = new ModifyPieceInstance(frame,cursor,Type.POSITION,objectFirstPosition,new Point(lastPosition));