%
%  Name: updtbars
% 
%  Usage: updtbars
% 
%   Description:
%	Updates the bar list from the 
%	interactive geometry function
%	'generategeom'
%

%  Version SWD960321
%
%  Copyright (c) 1996 by Scott W. Doebling
%	Los Alamos National Laboratory
%	ESA-EA, doebling@lanl.gov
%


ibar = str2num(get(hibar,'string'));
inode1 = str2num(get(hinode1,'string'));
inode2 = str2num(get(hinode2,'string'));

 if ibardel == 1,
     ibard = find(Bars(:,1) == ibar);
     if ~isempty(ibard),
       Bars(ibard,:) = [];
       disp(['Bar #',num2str(ibar),' deleted']);
     else
       disp(['Bar #',num2str(ibar),' not in list -- cannot delete']);
     end
     set(hbardel,'Value',0);
     ibardel=0;
  else
     Bars = addbars(Bars,ibar,inode1,inode2);
  end

return
