Skip to content

Commit a393ed0

Browse files
committed
Major bug fix: app previously kept same units from first channel shown
1 parent d26f023 commit a393ed0

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

@SplitMerge/plotUnits.m

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function plotUnits(app)
22
if app.Data.modified(1) || app.Data.doFirstPlot(1)
3-
%TODO: we now store which cluster IDs have been modified in
4-
% app.Data.modifyList. We should only update those axes!
3+
% we now store which cluster IDs have been modified in
4+
% app.Data.modifyList. So we only update those axes
55
app.Data.loader = uiprogressdlg(app.UIFigure,'Title','Please Wait',...
66
'Message','Loading clusters');
77

@@ -42,7 +42,13 @@ function plotUnits(app)
4242
if max_y > 0, max_y = 0; end % don't move anything if nothing's dropped off the bottom
4343

4444
app.SelectedUnits.Items = {'Loading...'};
45-
45+
46+
if app.Data.doFirstPlot(1)
47+
for s = 1:length(app.SpikePanels)
48+
app.SpikePanels{s} = [];
49+
end
50+
end
51+
4652
temp = cellfun(@isempty,app.SpikePanels);
4753
currentlyPlotted = find(~temp);
4854
clear temp

0 commit comments

Comments
 (0)