From 92b837e10ff567e28ef7c54f960f4e5bae564886 Mon Sep 17 00:00:00 2001 From: Jacques Grelet <jacques.grelet@ird.fr> Date: Mon, 14 Jan 2008 11:15:20 +0000 Subject: [PATCH] add uiresume in QuitProgram function to prevent error when main windows is closed --- tsgqc_GUI.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tsgqc_GUI.m b/tsgqc_GUI.m index 5d432f6..f07ec9a 100644 --- a/tsgqc_GUI.m +++ b/tsgqc_GUI.m @@ -1078,7 +1078,7 @@ tsg_initialisation(hMainFig, hQcCmenu) % Callback function run when the Quit menu item is selected % If the data have been modified and not save, the program - % propose to save the data + % ask to save the data % -------------------------------------------------------- if strcmp( get( hSaveMenu, 'UserData' ), 'on') selection = ... @@ -1107,9 +1107,16 @@ tsg_initialisation(hMainFig, hQcCmenu) % ---------------------------------------------------------------- function QuitProgram(hObject, eventdata) + % needed during QC operation if waitbuttonpress is active + % ------------------------------------------------------- + uiresume; + + % close the main windows + % ---------------------- delete(hMainFig); % reset Matlab search path to default + % ----------------------------------- rmpath( [DEFAULT_PATH_FILE filesep 'tsg_util'] ); rmpath( [DEFAULT_PATH_FILE filesep 'tsg_data'] ); rmpath( [DEFAULT_PATH_FILE filesep 'tsg_io'] ); -- GitLab