function retval = hasDialogEverOpened(hSrc, setval)
% Stores the info whether a dialog has ever been opened.

% Copyright 2006-2012 The MathWorks, Inc.

  persistent dlgEverOpend;
  if isempty(dlgEverOpend)
      dlgEverOpend = false;
  end

  if ~dlgEverOpend
      dlgEverOpend = setval;
  end
  retval = dlgEverOpend;
end
