function fdatoolwarning(hFig)
% FDATOOLWARNING FDATool's warning dialog box.  It displays lastwarn.
%                It also resets the mouse pointer and the status line.
%
% Input:
%  hFig - Handle to the Filter Design GUI figure.

%   Copyright 1988-2000 The MathWorks, Inc.
%   $Revision: 1.3 $  $Date: 2000/06/13 21:40:54 $ 

% Reset mouse pointer and status line.
setptr(hFig,'arrow');
update_status(hFig,'Ready');

ud = get(hFig,'UserData');

% Don't warn about log of zero which comes up often when plotting.
if ~strcmpi(lastwarn,'Log of zero'),
    h_warn = warndlg(lastwarn,'FDATool Warning');
end

% Log the dialog handle(s) in UD so we can close them upon exiting.
if isfield(ud.h,'dlgs') & isfield(ud.h.dlgs,'warning'),
    ud.h.dlgs.warning(end+1) = h_warn; % Multiple dialog case
else
    ud.h.dlgs.warning = h_warn;
end
set(hFig,'UserData',ud);

% [EOF] fdatoolwarning.m
