Commit 133f4eff authored by Jay Dubb's avatar Jay Dubb
Browse files

v1.22.6

-- Fix standalone PlotProbeGUI to work with the new distributed saving/loading
-- Fix standalone StimEditGUI to work with the new distributed saving/loading
-- Set window title for PlotProbeGUI to current element name
-- Set PlotProbeGUI default arguments to current folder and .snirf file format when no arguments are provided, instead of just exiting.
parent 2080f275
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ if ~exist('groupDirs','var') || isempty(groupDirs)
    groupDirs = convertToStandardPath(pwd);
end
if ~exist('inputFileFormat','var') || isempty(inputFileFormat)
    inputFileFormat='snirf';
    inputFileFormat = '.snirf';
end
cfg = ConfigFileClass();

+31 −4
Original line number Diff line number Diff line
@@ -107,9 +107,7 @@ varargin = args;
%     PlotProbeGUI(datatype, condition, pos)

% Arguments take precedence over parent gui parameters
if length(varargin)==0
    return;                                                 % PlotProbeGUI()
elseif length(varargin)==1
if length(varargin)==1
    if iswholenum(varargin{1}) & length(varargin{1})==1
        plotprobe.datatype = varargin{1};                   % PlotProbeGUI(datatype)
    else
@@ -223,6 +221,7 @@ handles.output = hObject;
guidata(hObject, handles);

Initialize(handles);
plotprobe.updateParentGui = [];

% Parse GUI args
ParseArgs(varargin);
@@ -259,6 +258,15 @@ DisplayData(handles, hObject);



% ----------------------------------------------------------------------
function SetWindowTitle(handles)
global plotprobe

windowtitlenew = sprintf('PlotProbeGUI:   %s', plotprobe.dataTree.currElem.GetName());
set(handles.figure, 'name', windowtitlenew)



% ----------------------------------------------------------------------
function DisplayData(handles, hObject)
global plotprobe
@@ -285,6 +293,13 @@ condition = plotprobe.condition;
datatype  = plotprobe.datatype;
currElem  = plotprobe.dataTree.currElem;

% Load current element data from file
if currElem.IsEmpty()
    currElem.Load();
end

SetWindowTitle(handles)

% Clear axes of previous data, before redisplaying it
ClearAxesData();

@@ -542,7 +557,12 @@ end
% ----------------------------------------------------------------------
function PlotProbeGUI_Close(hObject, eventdata, handles)
global plotprobe
if isempty(plotprobe)
    return
end
if ~isempty(plotprobe.updateParentGui) 
	plotprobe.updateParentGui('PlotProbeGUI');
end
if ishandles(plotprobe.handles.figureDup)
    delete(plotprobe.handles.figureDup);
end
@@ -561,12 +581,19 @@ end
ParseArgs(varargin);
axes(handles.axes1);

SetWindowTitle(handles)

condition = plotprobe.condition;
datatype  = plotprobe.datatype;

% Clear axes of previous data, before redisplaying it
ClearAxesData();

% Load current element data from file
if plotprobe.dataTree.currElem.IsEmpty()
    plotprobe.dataTree.currElem.Load();
end

nDataBlks = plotprobe.dataTree.currElem.GetDataBlocksNum();
plotprobe.y = cell(nDataBlks,1);
plotprobe.t = cell(nDataBlks,1);
+3 −1
Original line number Diff line number Diff line
@@ -249,7 +249,9 @@ if stimEdit.status==0
    return;
end
StimEditGUI_Display(handles);
if ~isempty(stimEdit.updateParentGui)
    stimEdit.updateParentGui('StimEditGUI');
end
figure(handles.figure);

% Reset status
+5 −0
Original line number Diff line number Diff line
@@ -22,6 +22,11 @@ if stimEdit.dataTree.currElem.iRun==0
    return;
end

% Load current element data from file
if stimEdit.dataTree.currElem.IsEmpty()
    stimEdit.dataTree.currElem.Load();
end

iG = stimEdit.dataTree.GetCurrElemIndexID();
CondNamesGroup = stimEdit.dataTree.groups(iG).GetConditions();
CondColTbl     = stimEdit.dataTree.groups(iG).CondColTbl();
+1 −1
Original line number Diff line number Diff line
@@ -2,5 +2,5 @@ function vrnnum = getVernum()

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