Commit 505e742f authored by Jay Dubb's avatar Jay Dubb
Browse files

v1.23.5

-- Fix bug which causes saveptr error when a child gui is active and traversing the data tree list in the MainGUI
-- Remove errordlg('There are no changes to save!','Unmodified file') from StimEditGUI because the dialog are easy to miss when traversing dataTree and they keep accumulating if user doesn't keep clicking ok say without making any stim changes.
parent 4d1f551b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ SNIRF
On

% Last Checked For Update
17-Jul-1998 16:07:16
03-Aug-2020 11:22:34

% Check For Updates
on
+1 −1
Original line number Diff line number Diff line
@@ -561,7 +561,6 @@ global stimEdit

% If nothing changes, nothing to save, so exit
if ~stimEdit.dataTree.currElem.AcquiredDataModified()
    errordlg('There are no changes to save!','Unmodified file')
    return
end

@@ -687,6 +686,7 @@ function SetTextFilename(name, handles)
if isempty(handles)
    return;
end

if ~ishandles(handles.textFilename)
    return;
end
+27 −8
Original line number Diff line number Diff line
@@ -92,6 +92,21 @@ classdef ChildGuiClass < handle
        end
        
        
        % -------------------------------------------------------------------
        function CopyHandles(obj, handles) %#ok<INUSL>
            props = propnames(handles);
            for ii = 1:length(props)               
                % If field does exist in handles, then chack that it's a
                % valid handle before copying it. 
                if eval( sprintf('ishandles(handles.%s)', props{ii}) )
                    eval( sprintf('obj.handles.%s = handles.%s;', props{ii}, props{ii}) )
                elseif eval( sprintf('isa(handles.%s, ''function_handle'')', props{ii}) )
                    eval( sprintf('obj.handles.%s = handles.%s;', props{ii}, props{ii}) )
                end
            end
        end
        
        
        % -------------------------------------------------------------------
        function Launch(obj, varargin)
            if isempty(obj)
@@ -113,6 +128,7 @@ classdef ChildGuiClass < handle
            
            % Allow up to 6 arguments to be passed to GUI
            a = obj.args;
            handles = []; %#ok<*PROPLC>
            switch(length(a))
                % Note that in addition to the guis known args we add as the last arg the last gui position. 
                % We do this because even we can set the position after launching gui, it is much nices when 
@@ -120,20 +136,23 @@ classdef ChildGuiClass < handle
                % appears only in the position we pass it since it is invisible until the gui's open function 
                % exits
                case 0
                    eval( sprintf('obj.handles = %s(obj.lastpos);', obj.name) );
                    eval( sprintf('handles = %s(obj.lastpos);', obj.name) );
                case 1
                    eval( sprintf('obj.handles = %s(a{1}, obj.lastpos);', obj.name) );
                    eval( sprintf('handles = %s(a{1}, obj.lastpos);', obj.name) );
                case 2
                    eval( sprintf('obj.handles = %s(a{1}, a{2}, obj.lastpos);', obj.name) );
                    eval( sprintf('handles = %s(a{1}, a{2}, obj.lastpos);', obj.name) );
                case 3
                    eval( sprintf('obj.handles = %s(a{1}, a{2}, a{3}, obj.lastpos);', obj.name) );
                    eval( sprintf('handles = %s(a{1}, a{2}, a{3}, obj.lastpos);', obj.name) );
                case 4
                    eval( sprintf('obj.handles = %s(a{1}, a{2}, a{3}, a{4}, obj.lastpos);', obj.name) );
                    eval( sprintf('handles = %s(a{1}, a{2}, a{3}, a{4}, obj.lastpos);', obj.name) );
                case 5
                    eval( sprintf('obj.handles = %s(a{1}, a{2}, a{3}, a{4}, a{5}, obj.lastpos);', obj.name) );
                    eval( sprintf('handles = %s(a{1}, a{2}, a{3}, a{4}, a{5}, obj.lastpos);', obj.name) );
                case 6
                    eval( sprintf('obj.handles = %s(a{1}, a{2}, a{3}, a{4}, a{5}, a{6}, obj.lastpos);', obj.name) );
                    eval( sprintf('handles = %s(a{1}, a{2}, a{3}, a{4}, a{5}, a{6}, obj.lastpos);', obj.name) );
            end
            
            obj.CopyHandles(handles);            
            
            if ishandle(obj.handles.figure)
                set(obj.handles.figure, 'visible',obj.visible, 'CloseRequestFcn',@obj.Close);
                set(obj.handles.figure, 'visible',obj.visible, 'DeleteFcn',@obj.Close);
@@ -231,7 +250,7 @@ classdef ChildGuiClass < handle
        
        
        % -------------------------------------------------------------------
        function Close(obj, hObject, eventdata)
        function Close(obj, hObject, eventdata) %#ok<INUSD>
            if isempty(obj.name)
                return;
            end
+1 −1
Original line number Diff line number Diff line
@@ -2,5 +2,5 @@ function vrnnum = getVernum()

vrnnum{1} = '1';   % Major version #
vrnnum{2} = '23';  % Major sub-version #
vrnnum{3} = '4';   % Minor version #
vrnnum{3} = '5';   % Minor version #
vrnnum{4} = '0';   % Minor sub-version # or patch #: 'p1', 'p2', etc