Commit fd37fc62 authored by jayd1860's avatar jayd1860
Browse files

v1.35.5

-- Fix error in ProcStreamEditGUI when saving proc stream in save callback and add progress bar to show occasional delays in proc stream loading.
-- Fix typo cauing error when launching ProcStreamOptionsGUI.
parent cb2b21a8
Loading
Loading
Loading
Loading
+21 −0
Original line number Original line Diff line number Diff line
@@ -537,6 +537,20 @@ end






% -------------------------------------------------------------
function [h, N, msg] = ShowProcStreamLoadProgress()
global procStreamEdit
procElem    = procStreamEdit.procElem;
listPsUsage = procStreamEdit.listPsUsage;
N = 0;
for iPanel = 1:length(procElem)
    N = N + listPsUsage(iPanel).GetSize();
end
msg = 'Please wait for processing stream to load ...';
h = waitbar_improved(0, msg);



% -------------------------------------------------------------
% -------------------------------------------------------------
function pushbuttonSave_Callback(~, ~, ~)
function pushbuttonSave_Callback(~, ~, ~)
global procStreamEdit
global procStreamEdit
@@ -552,12 +566,15 @@ listPsUsage = procStreamEdit.listPsUsage;
reg         = procStreamEdit.dataTree.reg;
reg         = procStreamEdit.dataTree.reg;
iGroupPanel = procStreamEdit.iGroupPanel;
iGroupPanel = procStreamEdit.iGroupPanel;
iSubjPanel  = procStreamEdit.iSubjPanel;
iSubjPanel  = procStreamEdit.iSubjPanel;
iSessPanel  = procStreamEdit.iSessPanel;
iRunPanel   = procStreamEdit.iRunPanel;
iRunPanel   = procStreamEdit.iRunPanel;


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% First get the user selection of proc stream function calls from the proc stream listbox 
% First get the user selection of proc stream function calls from the proc stream listbox 
% (listboxFuncProcStream) and load them into the procElem for all panels.
% (listboxFuncProcStream) and load them into the procElem for all panels.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[h, N, msg] = ShowProcStreamLoadProgress();
kk = 0;
for iPanel = 1:length(procElem)
for iPanel = 1:length(procElem)
    % Save current proc stream in a temp variable - we will copy the aram
    % Save current proc stream in a temp variable - we will copy the aram
    % values for any func call which reappears in the new proc stream
    % values for any func call which reappears in the new proc stream
@@ -581,6 +598,8 @@ for iPanel = 1:length(procElem)
        fcall = reg.funcReg(MapRegIdx(iPanel)).GetFuncCallDecoded(funcname, usagename);
        fcall = reg.funcReg(MapRegIdx(iPanel)).GetFuncCallDecoded(funcname, usagename);
        CopyParamValues(fcall, procStreamPrev.fcalls);
        CopyParamValues(fcall, procStreamPrev.fcalls);
        procElem{iPanel}.procStream.Add(fcall);
        procElem{iPanel}.procStream.Add(fcall);
        waitbar_improved(kk/N, h, msg);
        kk = kk+1;
    end
    end
    if isa(procElem{iPanel}, 'RunClass')  % Validate procstream order at run level only
    if isa(procElem{iPanel}, 'RunClass')  % Validate procstream order at run level only
       if procstreamOrderCheckDlg(procElem{iPanel}) == -1
       if procstreamOrderCheckDlg(procElem{iPanel}) == -1
@@ -588,6 +607,8 @@ for iPanel = 1:length(procElem)
       end
       end
    end
    end
end
end
close(h)



if isempty(listPsUsage)
if isempty(listPsUsage)
    MessageBox('Processing stream is empty. Please load or create a processing stream before saving it.');
    MessageBox('Processing stream is empty. Please load or create a processing stream before saving it.');
+0 −1
Original line number Original line Diff line number Diff line
@@ -412,7 +412,6 @@ if ~procStreamOptions.applyEditCurrNodeOnly
        end
        end
    end
    end
end
end
end




% --------------------------------------------------------------------
% --------------------------------------------------------------------
+1 −1
Original line number Original line Diff line number Diff line
1.35.4
1.35.5