Connector oldConnector = ((UndoActivity)
getUndoActivity()).getOldConnector();
// there has been no change so there is nothing to undo
if ((oldConnector == null)
|| (target() == null)
|| (oldConnector.owner() == target().owner())) {
setUndoActivity(null);
} else {
getUndoActivity().setAffectedFigures(new SingleFigureEnumerator(getConnection()));
}