Commit 3b50f2bd authored by Jay Dubb's avatar Jay Dubb
Browse files

v1.25.8

-- Fix bug in PlotProbeGUI when clicking the Show Time Intervals radio button.
-- Fix warning in Logger when handle disappears and we try to access it we should have exception handling around it.
-- Initialize stimEdit.locDataTree in StimEditGUI to empty and then check it in the Save() function to avoid matlab error that could cause unpredictable behavior later
parent 027eabd6
Loading
Loading
Loading
Loading
+12.7 KiB (57.6 KiB)

File changed.

No diff preview for this file type.

+2 −2
Original line number Diff line number Diff line
@@ -428,9 +428,9 @@ global plotprobe

plotprobe.tMarkShow = get(hObject,'value');
if plotprobe.tMarkShow
    set(plotprobe.handles.data{:,4:end}, 'visible','on');
    set(plotprobe.handles.data{1}(:,4:end), 'visible','on');
else
    set(plotprobe.handles.data{:,4:end}, 'visible','off');    
    set(plotprobe.handles.data{1}(:,4:end), 'visible','off');    
end


+12 −1
Original line number Diff line number Diff line
@@ -68,6 +68,7 @@ handles.output = hObject;
guidata(hObject, handles);

stimEdit = [];
stimEdit.locDataTree = [];

%%%% Begin parse arguments 

@@ -255,7 +256,12 @@ figure(handles.figure);
function axes1_ButtonDownFcn(hObject, eventdata, handles)
global stimEdit

[point1,point2] = extractButtondownPoints();
[point1, point2, err] = extractButtondownPoints();
if err<0
    MessageBox('Sorry there was a malfunction in the selection. Please try selecting again ...')
    return;
end

point1 = point1(1,1:2);              % extract x and y
point2 = point2(1,1:2);
p1 = min(point1,point2);
@@ -450,6 +456,7 @@ end
if menu_choice==nActions || menu_choice==0
    return;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% New stim
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -563,6 +570,10 @@ stimEdit.locDataTree.currElem.SetStimValues(icond, data(:,3));
function Save()
global stimEdit

if isempty(stimEdit.locDataTree)
    return;
end

% If nothing changes, nothing to save, so exit
if ~stimEdit.locDataTree.currElem.AcquiredDataModified()
    return
+6 −3
Original line number Diff line number Diff line
@@ -199,7 +199,10 @@ classdef Logger < handle
            if ~strcmp(self.appname, appname)
                return;
            end
            try
                fclose(self.fhandle);
            catch
            end            
            self.fhandle = -1;
        end
        
+3 −1
Original line number Diff line number Diff line
function [p1,p2] = extractButtondownPoints()
function [p1, p2, err] = extractButtondownPoints()

err = 0;

p1 = get(gca,'CurrentPoint');    % button down detected
finalRect = rbbox;                   % return figure units
Loading