@@ -266,18 +266,13 @@ function load_traj_buttom_Callback(hObject, eventdata, handles)
266
266
else
267
267
% Ask if the user wish to create animal groups
268
268
choice = questdlg(' Would you like to assign animals to groups?' , ...
269
- ' Assign Animals to Groups' ,' Yes' ,' No' ,' No' );
269
+ ' Assign Animals to Groups' ,' Yes' ,' No' ,' No' );
270
+ % set current GUI visibility to off
271
+ temp = findall(gcf );
272
+ set(temp ,' Visible' ,' off' );
270
273
switch choice
271
- case ' Yes'
272
- % set current GUI visibility to off
273
- temp = findall(gcf );
274
- set(temp ,' Visible' ,' off' );
275
- [groups_path ] = animal_groups(paths , get(handles .field_id ,' String' ), str2num(get(handles .text_sessions ,' String' )));
276
- % resume main GUI visibility
277
- set(temp ,' Visible' ,' on' );
278
- if isempty(groups_path )
279
- return ;
280
- end
274
+ case ' Yes'
275
+ [groups_path ] = animal_groups(paths , get(handles .field_id ,' String' ), str2num(get(handles .text_sessions ,' String' )));
281
276
case ' No'
282
277
groups_path = {};
283
278
disp(' No animal groups specified. All animals will belong to group 1' );
@@ -318,8 +313,18 @@ function load_traj_buttom_Callback(hObject, eventdata, handles)
318
313
% compute segments and features
319
314
segmentation_configs = config_segments(user_input );
320
315
if isempty(segmentation_configs .TRAJECTORIES )
316
+ % resume main GUI visibility
317
+ set(temp ,' Visible' ,' on' );
318
+ if isempty(groups_path )
319
+ return ;
320
+ end
321
321
return ;
322
322
end
323
+ % resume main GUI visibility
324
+ set(temp ,' Visible' ,' on' );
325
+ if isempty(groups_path )
326
+ return ;
327
+ end
323
328
% check if object is already cached and if not save it
324
329
rpath = check_cached_objects(segmentation_configs ,1 );
325
330
set(handles .seg_path ,' String' ,rpath );
0 commit comments