function quantizeapply(hFig)
%QUANTIZEAPPLY Action of pressing apply on quantize page.
%   QUANTIZEAPPLY(hFig) creates the reference qfilt object from the settings on
%   the ui and the coefficients in the current filter, and then stores the
%   reference qfilt back into the figure's user data.  If the quantize switch is
%   on, then the reference qfilt is copied to the current filter.

%   Thomas A. Bryan
%   Copyright 1988-2000 The MathWorks, Inc.
%   $Revision: 1.4 $  $Date: 2000/06/15 20:04:54 $ 

wrn = warning('off');
ud = get(hFig,'userdata');
ud.specs.quantize.refqfilt = quantize_cbs('ui2qfilt',hFig);
if ud.flags.quantizationswitch
  % If the quantization switch is on, then copy the reference qfilt to the
  % current filter.
  ud.filter = ud.specs.quantize.refqfilt;
end
set(hFig,'userdata',ud);
warning(wrn)

update_quantizeparams('update_all',hFig);