}
// Post duplicated items in a compound edit
this.undoSupport.beginUpdate();
// Add a undoable edit that will select previous items at undo
this.undoSupport.postEdit(new AbstractUndoableEdit() {
@Override
public void undo() throws CannotRedoException {
super.undo();
selectAndShowItems(oldSelectedItems);
}
});
addFurniture(furniture);
List<Selectable> emptyList = Collections.emptyList();
postCreateWalls(Home.getWallsSubList(items), emptyList, basePlanLocked);
postCreateRooms(Home.getRoomsSubList(items), emptyList, basePlanLocked);
postCreateDimensionLines(Home.getDimensionLinesSubList(items), emptyList, basePlanLocked);
postCreateLabels(Home.getLabelsSubList(items), emptyList, basePlanLocked);
// Add a undoable edit that will select all the items at redo
this.undoSupport.postEdit(new AbstractUndoableEdit() {
@Override
public void redo() throws CannotRedoException {
super.redo();
selectAndShowItems(items);
}