Commit 86735fac authored by Brad Kennedy's avatar Brad Kennedy
Browse files

Bug fixes and small performance

parent 1000ba1a
......@@ -695,7 +695,7 @@ u(22) = uicontrol('Parent',figh, ...
acceptcommand = [ 'g = get(gcbf, ''userdata'');' ...
'TMPREJ = g.winrej;' ...
tmpcom ...
'if g.children, delete(g.children); end;' ...
... % 'if g.children, delete(g.children); end;' ...
'delete(gcbf);' ...
'; clear g;']; % quitting expression
if ~isempty(g.command)
......@@ -710,7 +710,7 @@ u(22) = uicontrol('Parent',figh, ...
'Position',posbut(13,:), ...
'string',fastif(isempty(g.command),'CLOSE', 'CANCEL'), 'callback', ...
[ 'g = get(gcbf, ''userdata'');' ...
'if g.children, delete(g.children); end;' ...
... %'if g.children, delete(g.children); end;' ... Removed by Brad for 2015a compat
'close(gcbf);'] );
if ~isempty(g.events)
......@@ -1153,6 +1153,8 @@ else
lowlim = round(g.time*multiplier+1);
highlim = round(min((g.time+g.winlength)*multiplier+2,g.frames));
low_high_range = lowlim:highlim;
zlowhigh = zeros(1,length(low_high_range));
% Plot data and update axes
% -------------------------
......@@ -1208,15 +1210,19 @@ else
tmp_color=[.7 .7 .7];
end
end
plot_p1 = 1+tag_x_int*mark_inds(n_mark_inds-(fi-1));
plot_p2 = (g.chans-(chan_inds-1))*g.spacing;
plot_colour = g.chan_marks_struct(mark_inds(n_mark_inds-(fi-1))).tag_color;
for ci=1:length(chan_inds);
%plot tick...
plot(1+tag_x_int*mark_inds(n_mark_inds-(fi-1)),(g.chans-(chan_inds(ci)-1))*g.spacing,'<', ...
'MarkerEdgeColor', g.chan_marks_struct(mark_inds(n_mark_inds-(fi-1))).tag_color, ...
'MarkerFaceColor', g.chan_marks_struct(mark_inds(n_mark_inds-(fi-1))).tag_color, ...
'MarkerSize',8);
plot(plot_p1, plot_p2(ci),'<', ...
'MarkerEdgeColor', plot_colour, ...
'MarkerFaceColor', plot_colour, ...
'MarkerSize', 8);
%plot data
tmp_offset=(g.chans-(chan_inds(ci)-1))*g.spacing-(meandata(chan_inds(ci)));
line(1:length(lowlim:highlim),data(chan_inds(ci),lowlim:highlim) + tmp_offset, zeros(1,length(lowlim:highlim)), ...
line(1:length(low_high_range), ...
data(chan_inds(ci),low_high_range) + tmp_offset, zlowhigh, ...
'color', tmp_color, 'clipping','on');
end
end
......@@ -1876,7 +1882,7 @@ else
ve_eegplot('drawb');
else
%hh = findobj('tag','Etime','parent',fig);
if g.trialstag ~= -1,
if g.trialstag ~= -1,d
set(hh_etime, 'string', num2str(mod(tmppos(1)+lowlim-1,g.trialstag)/g.trialstag*(g.limits(2)-g.limits(1)) + g.limits(1)));
else set(hh_etime, 'string', num2str((tmppos(1)+lowlim-1)/g.srate)); % put g.time in the box
end;
......@@ -1893,7 +1899,11 @@ else
global on_data_ax;
if isempty(on_data_ax);
esh=findobj('tag','ESpacing','parent',gcbf);
set(esh,'enable','off');drawnow;set(esh,'enable','on');
set(esh,'enable','off');
drawnow;
set(esh,'enable','on');
eph=findobj('tag','EPosition','parent',gcbf);
set(eph,'enable','off');drawnow;set(eph,'enable','on');
on_data_ax=1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment