Changeset 664 for trunk/src/uigetfile_uvmat.m
- Timestamp:
- Jul 11, 2013, 11:56:47 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uigetfile_uvmat.m
r653 r664 123 123 function OK_Callback(option,filter_ext,hObject,event) 124 124 hfig=get(hObject,'parent');%handle of the fig 125 % if ~strcmp(get(hfig,'SelectionType'),'open')126 % return %select double click127 % end128 %set(hObject,'BackgroundColor',[1 1 0])% paint list in yellow to indicate action129 % drawnow130 125 htitlebox=findobj(hfig,'tag','titlebox'); % display the current dir name 131 126 DirName=get(htitlebox,'String'); … … 135 130 list=get(hlist,'String'); 136 131 index=get(hlist,'Value'); 137 SelectName=regexprep(list{index},'^\+/','');% remove the +/ used to mark dir 132 if ~isempty(regexp(list{index},'^\+/')) 133 return % quit if a dir has been opened 134 end 135 %SelectName=regexprep(list{index},'^\+/','');% remove the +/ used to mark dir 136 SelectName=list{index}; 138 137 ind_dot=regexp(SelectName,'\s*\.\.\.');%remove what is beyond '...' 139 138 if ~isempty(ind_dot) 140 139 SelectName=SelectName(1:ind_dot-1); 141 140 end 142 % if strcmp(SelectName,'..')% the upward dir option has been selected143 % FullSelectName=fileparts(DirName);144 % else145 141 FullSelectName=fullfile(DirName,SelectName); 146 % end147 142 if exist(FullSelectName,'file') 148 143 switch option … … 164 159 end 165 160 end 166 %set(hObject,'BackgroundColor',[0.7 0.7 0.7])% paint list in grey to indicate action end167 161 168 162 uiresume(get(hObject,'parent')) … … 253 247 %------------------------------------------------------------------------ 254 248 hfig=get(hObject,'parent');%handle of the fig 255 % if ~strcmp(get(hfig,'SelectionType'),'open')256 % return %select double click257 % end258 249 set(hObject,'BackgroundColor',[1 1 0])% paint list in yellow to indicate action 259 250 drawnow
Note: See TracChangeset
for help on using the changeset viewer.