Mercurial > hg > ltpda
view m-toolbox/m/gui/gltpda/g_RemParamCallback.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_RemParamCallback(hObject, varargin) global params selBlocks paramEnabled currParamIndex = get(hObject,'UserData'); paramKey = params.params(currParamIndex).key; paramVal = params.params(currParamIndex).val; params = remove(params,paramKey); addParamsPopup = findobj(gcf,'Tag','addparamspopup','Style','popupmenu'); paramTypes = get(addParamsPopup,'String'); switch class(paramVal) case 'specwin' paramTypes = [paramTypes;{'specwin'}]; case 'pzmodel' paramTypes = [paramTypes;{'pzmodel'}]; end set(addParamsPopup,'String',paramTypes) if ~strcmp(get_param(gcbh,'Tag'),'arithmetic') paramEnabled(currParamIndex)=[]; else paramcommand = g_BuildParamCommand(params); for kk=1:length(selBlocks), set_param(selBlocks(kk),'Description',paramcommand); end g_UpdateInports(paramKey,-1) % g_arithmetic(currPanel); return; end if strcmp(paramVal,'-->') % it's a data from Simulink: delete the relative inport block. g_UpdateInports(paramKey,-1); end set(findobj('Tag','apply'),'Enable','on'); set(findobj('Tag','undo'),'Enable','on'); if strcmp(get_param(gcbh,'Tag'),'arithmetic'), g_arithmetic(currPanel); else ltpdagui('Redraw',2) end end