Mercurial > hg > ltpda
comparison m-toolbox/m/gui/ltpdv/callbacks/ltpdv_objectList_select.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % LTPDV_OBJECTLIST_SELECT activates when the user selects cells in the | |
2 % workspace object list on the import panel | |
3 % | |
4 % M Hewitson 22-04-08 | |
5 % | |
6 % $Id: ltpdv_objectList_select.m,v 1.3 2008/09/02 07:51:47 hewitson Exp $ | |
7 % | |
8 function ltpdv_objectList_select(varargin) | |
9 | |
10 % Handles | |
11 myh = varargin{1}; | |
12 mainfig = varargin{end}; | |
13 | |
14 % Structure of selection details | |
15 sel = varargin{2}; | |
16 | |
17 % Get selected rows | |
18 rows = unique(sel.Indices(:,1)); | |
19 setappdata(mainfig, 'ObjectListSelectedRows', rows); | |
20 | |
21 % Set tooltip | |
22 objs = getappdata(mainfig, 'LTPDAobjects'); | |
23 if numel(rows) == 1 | |
24 w = display(objs{rows}); | |
25 str = []; | |
26 for j=1:numel(w) | |
27 str = [str sprintf('\n%s', w{j})]; | |
28 end | |
29 set(myh, 'TooltipString', sprintf('%s', str)); | |
30 | |
31 | |
32 % get object | |
33 obj = objs{rows}; | |
34 | |
35 ltpdv_properties_build_props(obj, mainfig) | |
36 | |
37 end | |
38 | |
39 | |
40 end | |
41 | |
42 % END |