fix(referencelines): and bring back the notification for worker updates but disallow duplication (#5005)

This commit is contained in:
Alireza authored and GitHub committed 2025-04-29 14:53:37 -04:00
1 parent 4643d6dc40
commit 98f8187dfe
21 files changed
+285 -65

No files matched your search

@@ -180,15 +180,12 @@ const CornerstoneViewportDownloadForm = ({
const toolGroup = ToolGroupManager.getToolGroupForViewport(activeViewportId, renderingEngineId);
toolGroup.addViewport(downloadViewportId, renderingEngineId);
Object.keys(toolGroup.getToolInstances()).forEach(toolName => {
if (show && toolName !== 'Crosshairs') {
try {
toolGroup.setToolEnabled(toolName);
} catch (error) {
console.debug('Error enabling tool:', error);
}
} else {
toolGroup.setToolDisabled(toolName);
const toolInstances = toolGroup.getToolInstances();
const toolInstancesArray = Object.values(toolInstances);
toolInstancesArray.forEach(toolInstance => {
if (toolInstance.constructor.isAnnotation !== false) {
toolGroup.setToolEnabled(toolInstance.toolName);
}
});
};