Skip to content

Commit 44b2f1f

Browse files
committed
Fixed issue with selecting multiple epoch groups with different sources
1 parent fcea2b2 commit 44b2f1f

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/main/matlab/+symphonyui/+ui/+presenters/DataManagerPresenter.m

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,24 @@ function updateEpochGroupNode(obj, group)
341341
end
342342

343343
function populateDetailsForEpochGroupSet(obj, groupSet)
344-
allSources = obj.documentationService.getExperiment().allSources;
345-
346344
obj.view.enableEpochGroupLabel(groupSet.size == 1);
347345
obj.view.setEpochGroupLabel(groupSet.label);
348346
obj.view.setEpochGroupStartTime(strtrim(datestr(groupSet.startTime, 14)));
349347
obj.view.setEpochGroupEndTime(strtrim(datestr(groupSet.endTime, 14)));
348+
349+
source = groupSet.source;
350+
if isempty(source)
351+
names = {' '};
352+
values = {[]};
353+
else
354+
sources = obj.documentationService.getExperiment().allSources;
355+
names = cellfun(@(s)s.label, sources, 'UniformOutput', false);
356+
values = sources;
357+
end
350358
obj.view.enableSelectEpochGroupSource(groupSet.size == 1);
351-
obj.view.setEpochGroupSourceList(cellfun(@(s)s.label, allSources, 'UniformOutput', false), allSources);
352-
obj.view.setSelectedEpochGroupSource(groupSet.source);
359+
obj.view.setEpochGroupSourceList(names, values);
360+
obj.view.setSelectedEpochGroupSource(source);
361+
353362
obj.view.setCardSelection(obj.view.EPOCH_GROUP_CARD);
354363

355364
obj.populateCommonDetailsForEntitySet(groupSet);

0 commit comments

Comments
 (0)