IDC2361: fix seg combobox filling

This commit is contained in:
Davide Punzo committed 2021-04-19 19:42:30 +02:00
1 parent d2e75b0f20
commit e41ba2bfde
7 files changed
+68 -25

No files matched your search

@@ -47,16 +47,11 @@ export default async function setActiveLabelmap(
return labelmapIndex;
}
if (displaySet.isLoading) {
return activeLabelmapIndex;
}
if (!displaySet.isLoaded) {
try {
await displaySet.load(referencedDisplaySet, studies);
} catch (error) {
displaySet.isLoaded = false;
displaySet.isLoading = false;
displaySet.loadError = true;
onDisplaySetLoadFailure(error);
@@ -74,8 +69,11 @@ export default async function setActiveLabelmap(
// This might have just been created, so need to use the non-cached value.
state = cornerstoneTools.getModule('segmentation').state;
brushStackState = state.series[firstImageId];
brushStackState.activeLabelmapIndex = labelmapIndex;
if (brushStackState) {
brushStackState.activeLabelmapIndex = labelmapIndex;
}
refreshViewports();
callback();