From a262e727fe4a7e901d2565b6ffbb7be985d0de59 Mon Sep 17 00:00:00 2001 From: Yves Gouriou <yves.gouriou@ird.fr> Date: Fri, 14 Mar 2008 10:18:24 +0000 Subject: [PATCH] Modification de la structure d'initialisation de la structure root --- tsg_util/tsg_initialisation.m | 10 ++++++++++ tsg_util/tsg_preferences.m | 16 +--------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/tsg_util/tsg_initialisation.m b/tsg_util/tsg_initialisation.m index f30a9b2..6aea132 100644 --- a/tsg_util/tsg_initialisation.m +++ b/tsg_util/tsg_initialisation.m @@ -176,3 +176,13 @@ tsg.REFERENCE_DATE_TIME = REFERENCE_DATE_TIME; % Save tsg structure % ------------------ setappdata( hMainFig, 'tsg_data', tsg); + +% init root structure to default values +% ------------------------------------- +root.preference.autoload = 'off'; +root.version = 'unknown'; +root.preference.parameter = 'SSPS'; + +% Save root structure in MainFig +% ------------------------------ +set( 0, 'userdata', root ); diff --git a/tsg_util/tsg_preferences.m b/tsg_util/tsg_preferences.m index 32e0a94..093c512 100644 --- a/tsg_util/tsg_preferences.m +++ b/tsg_util/tsg_preferences.m @@ -48,20 +48,11 @@ switch fid % disactive the preference mode (for test or bug) % ----------------------------------------------- case -2 - - % init root structure to default values - % ------------------------------------- - root.preference.autoload = 'off'; - root.version = VERSION; % call default tsg_initialisation % ------------------------------- tsg_initialisation(hTsgGUI); - % save root in root object for next use - % ------------------------------------- - set(0, 'userdata', root); - return; % file exist and is open, fid > 2 @@ -74,7 +65,7 @@ switch fid % Initialize loading preference file waitbar % ------------------------------------------ - wb = waitbar(0, 'Loading préference file. Please wait...'); + wb = waitbar(0, 'Loading preference file. Please wait...'); % display waitbar % --------------- @@ -164,11 +155,6 @@ set(0, 'userdata', root); % ------------------------------------- tsg = getappdata( hTsgGUI, 'tsg_data'); - % init root structure to default values - % ------------------------------------- - root.preference.autoload = 'off'; - root.version = VERSION; - % save root and tsg to 'prefdir.mat' file % --------------------------------------- save(config_file, 'root', 'tsg'); -- GitLab