Skip to content

Commit

Permalink
fix menu path and history
Browse files Browse the repository at this point in the history
  • Loading branch information
arnodelorme committed Nov 19, 2021
1 parent 835f061 commit dfbf855
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions eegplugin_eegstats.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@
error('eegplugin_eegstats requires 3 arguments');
end

if ~exist('pop_eegstats')
if ~exist('restingIAF')
p = which('eegplugin_eegstats');
p = p(1:findstr(p,'eegplugin_eegstats.m')-1);
p = fileparts(p);
addpath(p);
addpath(fullfile(p, 'restingIAF'));
end

% find DIPFIT menu handle
tools_m = findobj(fig, 'tag', 'tools'); % find by tag

% we create the menu below
cb = [ 'try, LASTCOM = pop_eegstats(EEG);' catchstrs.add_to_hist ];
cb = [ 'try, [~,~,~,LASTCOM] = pop_eegstats(EEG);' catchstrs.add_to_hist ];
uimenu( tools_m, 'label', 'EEG stats', 'CallBack', cb, 'separator', 'on');


0 comments on commit dfbf855

Please sign in to comment.