if (!isValidText(getOriginalText())) { FigureEnumeration fe  = getAffectedFigures(); while (fe.hasNextFigure()) { getDrawingView().drawing().orphan(fe.nextFigure()); } }  else if (!isValidText(getBackupText())) { FigureEnumeration fe  = getAffectedFigures(); while (fe.hasNextFigure()) { getDrawingView().add(fe.nextFigure()); } setText(getOriginalText()); } else { setText(getOriginalText()); }
setText(getOriginalText());
		public boolean undo() {			if (!super.undo()) {				return false;			}			getDrawingView().clearSelection();			if (!isValidText(getOriginalText())) {				FigureEnumeration fe  = getAffectedFigures();				while (fe.hasNextFigure()) {					getDrawingView().drawing().orphan(fe.nextFigure());				}			}			// add text figure if it has been removed (no backup text)			else if (!isValidText(getBackupText())) {				FigureEnumeration fe  = getAffectedFigures();				while (fe.hasNextFigure()) {					getDrawingView().add(fe.nextFigure());				}				setText(getOriginalText());			}			else {				setText(getOriginalText());			}			return true;		}