private void moveStickables( StickableMap stickables, boolean undoable, Rectangle oldRect, StickingPolygon stickingPolygonBeforeLocationChange, String oldAddAttr) { Map<Stickable, List<PointChange>> stickableChanges = Stickables.moveStickPointsBasedOnPolygonChanges( stickingPolygonBeforeLocationChange, generateStickingBorder(), stickables, getGridSize()); if (undoable) { undoStack.add( new UndoInformation( getRectangle(), oldRect, stickableChanges, getGridSize(), oldAddAttr, getAdditionalAttributes())); } }
@Override public void mergeUndoDrag() { UndoInformation undoInfoA = undoStack.remove(); UndoInformation undoInfoB = undoStack.remove(); undoStack.add(undoInfoA.merge(undoInfoB)); }