Unverified Commit 196d85e0 authored by jayd1860's avatar jayd1860 Committed by GitHub
Browse files

Merge pull request #124 from jayd1860/development

Merge in 2 error fixes in ProcStreamEditGUI save callback and typo when launching ProcStreamOptionsGUI.
parents 08deaaba fd37fc62
Loading
Loading
Loading
Loading
+21 −0
Original line number 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(~, ~, ~)
global procStreamEdit
@@ -552,12 +566,15 @@ listPsUsage = procStreamEdit.listPsUsage;
reg         = procStreamEdit.dataTree.reg;
iGroupPanel = procStreamEdit.iGroupPanel;
iSubjPanel  = procStreamEdit.iSubjPanel;
iSessPanel  = procStreamEdit.iSessPanel;
iRunPanel   = procStreamEdit.iRunPanel;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[h, N, msg] = ShowProcStreamLoadProgress();
kk = 0;
for iPanel = 1:length(procElem)
    % 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
@@ -581,6 +598,8 @@ for iPanel = 1:length(procElem)
        fcall = reg.funcReg(MapRegIdx(iPanel)).GetFuncCallDecoded(funcname, usagename);
        CopyParamValues(fcall, procStreamPrev.fcalls);
        procElem{iPanel}.procStream.Add(fcall);
        waitbar_improved(kk/N, h, msg);
        kk = kk+1;
    end
    if isa(procElem{iPanel}, 'RunClass')  % Validate procstream order at run level only
       if procstreamOrderCheckDlg(procElem{iPanel}) == -1
@@ -588,6 +607,8 @@ for iPanel = 1:length(procElem)
       end
    end
end
close(h)


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


% --------------------------------------------------------------------
+5 −5
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@ if ~exist('repo','var') || isempty(repo)
    repo = pwd;
end
repoFull = filesepStandard_startup(repo, 'full');
[~,f,e] = fileparts(repoFull(1:end-1));

h = waitbar(0, sprintf('Please wait for date of last rev for "%s" ...', [f,e]));

f1 = findTypeFiles(repoFull, '.m');
f2 = findTypeFiles(repoFull, '.txt');
@@ -13,15 +16,12 @@ f = [f1; f2; f3];

for ii = 1:length(f)
    pathrel = pathsubtract(f{ii}, repoFull);
    try
    [d, ds] = gitLastRevDate(repoFull, pathrel);
    if d>date
        date = d;
        dateS = ds;
    end
    catch
        d=1;
    end
    waitbar(ii / length(f), h)
end

close(h);
+8 −1
Original line number Diff line number Diff line
@@ -12,9 +12,16 @@ cmds{ii,1} = sprintf('cd %s', repoFull); ii = ii+1;
cmds{ii,1} = sprintf('git log -1 --format=%%ci --date=short %s', file);
[errs, msgs] = exeShellCmds(cmds, false, true);
if all(errs==0)
    c = str2cell(msgs{2}, ' ');
    if ~isempty(msgs{2})
        ds = msgs{2};
    else
        ds = char(datetime('now','TimeZone','local','Format','yyyy-MM-dd HH:mm:ss'));
    end
    c = str2cell(ds, ' ');
    
    dateS = c{1};
    timeS = c{2};

    dateS(dateS=='-')='';
    timeS(timeS==':')='';    
    
+1 −1
Original line number Diff line number Diff line
1.35.4
1.35.5
+1 −1

File changed.

Contains only whitespace changes.

Loading