Commit 2a960899 authored by Jay Dubb's avatar Jay Dubb
Browse files

v1.21.0

-- Fix bug where child GUIs like ProcStreamEditGUI and StimEditGUI will not launch when using Matlab 2020a. That's because of faulty menu callback code that happened to work by accident but in 2020a something small changed to expose the bug. Added LaunchChildGuiFromMenu function
parent ad6a8566
Loading
Loading
Loading
Loading
+37 −56
Original line number Diff line number Diff line
@@ -616,14 +616,46 @@ end



% -------------------------------------------------------------------
function [eventdata, handles] = menuItemLaunchStimGUI_Callback(hObject, eventdata, handles)
% --------------------------------------------------------------------
function LaunchChildGuiFromMenu(guiname, h)
global maingui
if ~ishandles(hObject)
if ~ishandles(h)
    return;
end
idx = FindChildGuiIdx('StimEditGUI');
idx = FindChildGuiIdx(guiname);
checked = get(h,'checked');
if strcmp(checked, 'off')
    set(h, 'checked', 'on');
    maingui.childguis(idx).Launch();
elseif strcmp(checked, 'on')
    set(h, 'checked', 'off');
    maingui.childguis(idx).Close();
end



% --------------------------------------------------------------------
function menuItemPlotProbe_Callback(hObject, eventdata, handles)
LaunchChildGuiFromMenu('PlotProbeGUI', hObject);



% -------------------------------------------------------------------
function [eventdata, handles] = menuItemLaunchStimGUI_Callback(hObject, eventdata, handles)
LaunchChildGuiFromMenu('StimEditGUI', hObject);



% --------------------------------------------------------------------
function [eventdata, handles] = menuItemProcStreamEdit_Callback(hObject, eventdata, handles)
LaunchChildGuiFromMenu('ProcStreamEditGUI', hObject);




% --------------------------------------------------------------------
function menuItemDisplayPvalues_Callback(hObject, eventdata, handles)
LaunchChildGuiFromMenu('PvaluesDisplayGUI', hObject);



@@ -639,7 +671,6 @@ maingui.dataTree.currElem.Save();

% --------------------------------------------------------------------
function [eventdata, handles] = menuItemViewHRFStdErr_Callback(hObject, eventdata, handles)
global maingui
if ~ishandles(hObject)
    return;
end
@@ -652,24 +683,6 @@ end
Display(handles, hObject);




% --------------------------------------------------------------------
function [eventdata, handles] = menuItemProcStreamEdit_Callback(hObject, eventdata, handles)
global maingui
if ~ishandles(hObject)
    return;
end

checked = get(hObject,'checked');
idx = FindChildGuiIdx('ProcStreamEditGUI');
if checked
    maingui.childguis(idx).Launch();
else
    maingui.childguis(idx).Close();
end


% --------------------------------------------------------------------
function [eventdata, handles] = checkboxApplyProcStreamEditToAll_Callback(hObject, eventdata, handles)
global maingui
@@ -1311,50 +1324,18 @@ if strcmp(get(hObject, 'checked'), 'on')
end



% --------------------------------------------------------------------
function menuItemDisplayPvalues_Callback(hObject, eventdata, handles)
global maingui
if ~ishandles(hObject)
    return;
end

idx = FindChildGuiIdx('PvaluesDisplayGUI');
maingui.childguis(idx).Launch();



% --------------------------------------------------------------------
function checkboxPlotAux_Callback(hObject, eventdata, handles)
Display(handles, hObject);




% --------------------------------------------------------------------
function popupmenuAux_Callback(hObject, eventdata, handles)
Display(handles, hObject);



% --------------------------------------------------------------------
function menuItemPlotProbe_Callback(hObject, eventdata, handles)
global maingui
if ~ishandles(hObject)
    return;
end

idx = FindChildGuiIdx('PlotProbeGUI');
if strcmp(get(hObject, 'checked'), 'off')
    set(hObject, 'checked', 'on');
    maingui.childguis(idx).Launch(GetDatatype(handles), GetCondition(handles));
else
    set(hObject, 'checked', 'off');
    maingui.childguis(idx).Close();
end



% --------------------------------------------------------------------
function menuItemCopyPlots_Callback(hObject, eventdata, handles)

+2 −2
Original line number Diff line number Diff line
function vrnnum = getVernum()

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