
function my_closereq(obj,evnt)
%my_closereq What is done when the user closes the execution window
% INPUT
% Property 'userdata' of 'obj' contains two components:
% 1/ the name of the current task (ignored)
% 2/ '1' if current execution is interactive
%% ======================================================
userdata= get(obj, 'userdata');
% Ignored: tache = userdata(1);
interactif =  userdata(2);
if strcmp(interactif, '1')
    
    selection = questdlg('Do you want to quit the current task?',...
        'Close',...
        'Yes','No','Yes');
    
    
    switch selection,
        case 'Yes',
            delete(gcf)
            close all force
            %AB ajout de l'appel à FILTREX pour revenir
            % au dialogue principal quand on ferme le fenetre d'execution
            FILTREX()
            
        case 'No'
            return
    end
else
    delete(gcf)
    FILTREX()
end
end % fin my_closereq
