Mercurial > hg > ltpda
view m-toolbox/m/gui/gltpda/g_RemParamCallback.m @ 41:6def6533cb16 database-connection-manager
Report authentication errors to user
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 18:04:34 +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