function wasOnList = removeFromDialogsList(dp,dlg)
% Remove dialog from Dialogs master list, if present.

%   Copyright 2010 The MathWorks, Inc.

test = dlg.DialogContent.ID == getID(dp.Dialogs);
dp.Dialogs(test) = [];
wasOnList = any(test);
