diff --git a/tsg_util/tsg_initialisation.m b/tsg_util/tsg_initialisation.m index f30a9b234006a75c144ffbf0965310ed3550c9ed..6aea132945a633de8bb833a9c6602fbb6c0c0fe3 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 32e0a94fb84ec92348d7c50e87a9da091c72b348..093c512ae1b2967638b849d6ca820a27beced992 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');