OHIF-152 Fix hanging protocol issues
- Replace “OHIF.viewerbase.showConfirmDialog” with “Viewerbase.dialogUtils.showConfirmDialog” - Check the length of the filtered images (instead of checking whether it is undefined, because the filtered images is returned as an empty array if not found) to find the display set in protocolEngine
This commit is contained in:
parent
dff42c0360
commit
2e06b652b3
@ -5,6 +5,7 @@ import { Random } from 'meteor/random';
|
||||
import { $ } from 'meteor/jquery';
|
||||
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
import { Viewerbase } from 'meteor/ohif:viewerbase';
|
||||
import 'meteor/ohif:viewerbase';
|
||||
|
||||
/**
|
||||
@ -372,7 +373,7 @@ Template.protocolEditor.events({
|
||||
text: 'Are you sure you would like to remove this Protocol? This cannot be reversed.'
|
||||
};
|
||||
|
||||
OHIF.viewerbase.showConfirmDialog(() => {
|
||||
Viewerbase.dialogUtils.showConfirmDialog(() => {
|
||||
// Remove the Protocol
|
||||
HP.ProtocolStore.removeProtocol(selectedProtocol.id);
|
||||
|
||||
|
||||
@ -479,12 +479,14 @@ HP.ProtocolEngine = class ProtocolEngine {
|
||||
};
|
||||
|
||||
// Filter imageSet function: filter by InstanceUid
|
||||
const filterImageSetFn = (imageSet, sopInstanceUid) => {
|
||||
return imageSet.getData().sopInstanceUid === instance.sopInstanceUid;
|
||||
const filterImageFn = (image) => {
|
||||
return image.getData().sopInstanceUid === instance.sopInstanceUid;
|
||||
};
|
||||
|
||||
// Find the displaySet
|
||||
const displaySet = study.displaySets.find(ds => ds.images.filter(imageSet => filterImageSetFn));
|
||||
const displaySet = study.displaySets.find(ds => {
|
||||
return ds.images.filter(filterImageFn).length > 0;
|
||||
});
|
||||
|
||||
// If the instance was found, set the displaySet ID
|
||||
if (displaySet) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user