0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 function g_SetsUpdate(hObject,varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 % Whenever the user select a different set of params
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 global params paramSets paramEnabled selBlocks
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 currSet = get(hObject,'Value');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 paramSets = pset(paramSets,'currSet',currSet);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 functionname = getappdata(0,'ltpda_currFunctionName');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 [func,currClass] = strtok(get(gcbh,'Tag'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 infoObj = eval([currClass,'.getInfo(''',functionname,''')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 params = infoObj.plists(currSet);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 paramEnabled = zeros(1,nparams(params));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 paramcommand = g_BuildParamCommand(params);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 for kk=1:length(selBlocks), set_param(selBlocks(kk),'Description',paramcommand); end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 % Finally set the block annotation:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 for nn=1:length(selBlocks), set_param(selBlocks(nn),'AttributesFormatString',''); end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 % buildplistFigureParam([],[],get(findobj('Tag','paramsPage'),'UserData'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 GUIprefs = getappdata(0, 'GUIpreferences');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 if GUIprefs.Detach, open_system(bdroot); end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 selBlocks = nan;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 end
|