view m-toolbox/m/gui/gltpda/g_WindListCallback.m @ 52:daf4eab1a51e database-connection-manager tip

Fix. Default password should be [] not an empty string
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:29:47 +0100
parents f0afece42f48
children
line wrap: on
line source

function g_WindListCallback(hObject, varargin)
   
   global params objName
   
   currParamID   = get(hObject,'UserData');
   currWindValue = get(hObject,'Value');
   listWindows   = ['Kaiser',specwin.getTypes];
   currWindow    = listWindows{currWindValue};
   oldWindObj    = params.params(currParamID).val;
   oldWindow     = oldWindObj.type;
   if strcmp(currWindow,oldWindow), return;
   else
      currWindLength = str2double(get(objName{currParamID,4},'String'));
      if strcmp(currWindow,'Kaiser'), windobj = specwin(currWindow,currWindLength,round(oldWindObj.psll));
      else windobj = specwin(currWindow,currWindLength);
      end
   end
   params=pset(params,params.params(currParamID).key,windobj);
   set(findobj('Tag','apply'),'Enable','on');
   set(findobj('Tag','undo'),'Enable','on');
   
   currPanel = get(hObject,'Parent');
   fieldPosition = get(hObject,'Position');
   if strcmp(currWindow,'Kaiser')
    % PSL value if Kaiser:
      currPSL = params.params(currParamID).val.psll;
      objName{currParamID,5} =  uicontrol('Parent',currPanel,'BackgroundColor',[1 1 1],'Units','pixels','Position',[275 fieldPosition(2) 60 20],'String',num2str(currPSL),'TooltipString','Peak Sidelobe','Visible','on','Enable','on','UserData',currParamID,'Callback',@g_WindPSLCallback,'Style','edit');
   else
      try delete(objName{currParamID,5}); catch, end;
   end
   
end