Commit bbf3fe08 authored by Jay Dubb's avatar Jay Dubb
Browse files

v1.30.3

-- Sync data tree and utils with AtlasViewer
-- Fix File menu item Change Groups not working because of new MainGUI calling syntax with unit test being a new argument
-- Add reset option to RegistriesClass constructor to only remove the saved registry file then exit for unit testing puprpose. It fixes unit test for .nirs which needs to regenetare the Registry to include Archive folder contain *_nirs user functions.
parent 285c6d8d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ while files.isempty()
            case {'snirf','.snirf'}
        msg{1} = sprintf('Homer3 did not find any %s data files to load in the current group folder. ', fmt);        
        msg{2} = sprintf('Do you want to select another group folder?');
        q = MenuBox([msg{:}], {'YES','NO'});
        q = MenuBox(msg, {'YES','NO'});
        if q==2
            files = DataFilesClass();
            return;
@@ -140,7 +140,7 @@ if files.config.RegressionTestActive
elseif  files.isempty()
    msg{1} = sprintf('Homer3 did not find any .snirf files in the current folder but did find %d .nirs files. ', filesSrc.nfiles);
    msg{2} = sprintf('Do you want to convert .nirs files to .snirf format and load them?');
    q = MenuBox([msg{:}], {'YES','NO'}, 'center');
    q = MenuBox(msg, {'YES','NO'}, 'center');
else
    if files.nfiles>1
        s = 'have';
@@ -154,7 +154,7 @@ else
        msg{1} = sprintf('Homer3 found %d .nirs file which has not been converted to .snirf format and %d that %s. ', filesSrc.nfiles-files.nfiles, files.nfiles, s);
        msg{2} = sprintf('Do you want to convert the remaining .nirs file to .snirf format?');
    end
    q = MenuBox([msg{:}], {'YES','NO'}, 'center');
    q = MenuBox(msg, {'YES','NO'}, 'center');
end

+3 −3
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ classdef DataTreeClass < handle
                msg{3} = sprintf('Do you want to rename the .%s files to names with a .old extension, delete them or cancel? ', format0);
                msg{2} = sprintf('NOTE: Renaming or deleting the .%s files will allow Homer3 to regenerate them from .%s file later.', ...
                    format0, dataInit.type);
                q = MenuBox([msg{:}], {'Rename (Recommended)','Delete','CANCEL'}, [], 90);
                q = MenuBox(msg, {'Rename (Recommended)','Delete','CANCEL'}, [], 90);
                if q==1
                    DeleteDataFiles(obj.dirnameGroups, format0, 'move')
                    status = true;
@@ -187,11 +187,11 @@ classdef DataTreeClass < handle
    
            %             msg{1} = sprintf('Could not load any of the requested files in the group folder %s. ', obj.dirnameGroups);
            %             msg{2} = sprintf('Do you want to select another group folder?');
            %             q = MenuBox([msg{:}], {'YES','NO'});
            %             q = MenuBox(msg, {'YES','NO'});
                        
            msg{1} = sprintf('Could not load any of the requested files in the group folder %s. ', obj.dirnameGroups);
            msg{2} = sprintf('Do you want to select another group folder?');
            q = MenuBox([msg{:}], {'YES','NO'}, [], 110);
            q = MenuBox(msg, {'YES','NO'}, [], 110);
            if q==2
                obj.logger.Write(sprintf('Skipping group folder %s...\n', obj.dirnameGroups));
                obj.dirnameGroups = 0;
+8 −1
Original line number Diff line number Diff line
@@ -701,7 +701,7 @@ classdef TreeNodeClass < handle
                status = 0;
                return;
            end
            selection = MenuBox([msg{:}], choices, [], [], 'dontAskAgainOptions');
            selection = MenuBox(msg, choices, [], [], 'dontAskAgainOptions');
            if selection(1)==1
                status = 0;
            end
@@ -723,6 +723,13 @@ classdef TreeNodeClass < handle
                        
        end
        
        
        % ------------------------------------------------------------
        function val = GetError(obj)
            val = obj.err;
            
        end
                
    end

    
+4 −0
Original line number Diff line number Diff line
@@ -44,6 +44,10 @@ classdef RegistriesClass < handle
            if strcmp(mode, 'empty')
                return;
            end
            if strcmp(mode, 'reset')
                obj.DeleteSaved();
                return;
            end
            
            % Check if saved registry exists. If so load that and exit
            if ~strcmp(mode, 'reload')
+2 −1
Original line number Diff line number Diff line
@@ -647,6 +647,7 @@ if ~ishandles(hObject)
    return;
end
fmt = maingui.format;
unitTest = maingui.unitTest;

% Change directory
pathnm = uigetdir( cd, 'Pick the new directory' );
@@ -660,7 +661,7 @@ if isempty(maingui.unitTest)
end

% restart
MainGUI(pathnm, fmt, 'userargs');
MainGUI(pathnm, fmt, unitTest, 'userargs');



Loading