getUndoActivity().setAffectedFigures(view().selection()); copyFigures(getUndoActivity().getAffectedFigures(), view().selectionCount());
FigureEnumeration fe = view().selection(); List affected = CollectionsFactory.current().createList(); Figure f; FigureEnumeration dfe; while (fe.hasNextFigure()) { f = fe.nextFigure(); affected.add(0, f); dfe = f.getDependendFigures(); if (dfe != null) { while (dfe.hasNextFigure()) { affected.add(0, dfe.nextFigure()); } } } fe = new FigureEnumerator(affected); getUndoActivity().setAffectedFigures(fe); UndoActivity ua = (UndoActivity) getUndoActivity(); ua.setSelectedFigures(view().selection()); copyFigures(ua.getSelectedFigures(), ua.getSelectedFiguresCount());
	public void execute() {		super.execute();		setUndoActivity(createUndoActivity());		getUndoActivity().setAffectedFigures(view().selection());		copyFigures(getUndoActivity().getAffectedFigures(),			view().selectionCount());		deleteFigures(getUndoActivity().getAffectedFigures());		view().checkDamage();	}