% LTPDV_OBJECTLIST_SELECT activates when the user selects cells in the
% workspace object list on the import panel
%
% M Hewitson 22-04-08
%
% $Id: ltpdv_objectList_select.m,v 1.3 2008/09/02 07:51:47 hewitson Exp $
%
function ltpdv_objectList_select(varargin)

  % Handles
  myh     = varargin{1};
  mainfig = varargin{end};

  % Structure of selection details
  sel = varargin{2};

  % Get selected rows
  rows = unique(sel.Indices(:,1));
  setappdata(mainfig, 'ObjectListSelectedRows', rows);

  % Set tooltip
  objs = getappdata(mainfig, 'LTPDAobjects');
  if numel(rows) == 1
    w = display(objs{rows});
    str = [];
    for j=1:numel(w)
      str = [str sprintf('\n%s', w{j})];
    end
    set(myh, 'TooltipString', sprintf('%s', str));


    % get object
    obj = objs{rows};

    ltpdv_properties_build_props(obj, mainfig)

  end


end

% END