ui(settings): Moved Segment Label Display from tools to settings panel (#5422)

Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
This commit is contained in:
Dan RukasandJoe Boccanfuso authored and GitHub committed 2025-09-29 12:47:45 -04:00
1 parent 41d4398342
commit c91752d575
6 files changed
+24 -54

No files matched your search

+4 -10
View File
@@ -1858,22 +1858,16 @@ function commandsModule({
}
});
},
toggleSegmentLabel: () => {
toggleSegmentLabel: ({ enabled }) => {
const toolName = cornerstoneTools.SegmentLabelTool.toolName;
const toolGroupIds = toolGroupService.getToolGroupIds();
const isOn = toolGroupIds.some(toolGroupId => {
const toolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(toolGroupId);
const mode = toolGroup.getToolInstance(toolName)?.mode;
return mode === 'Active';
});
toolGroupIds.forEach(toolGroupId => {
const toolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(toolGroupId);
if (isOn) {
toolGroup.setToolDisabled(toolName);
} else {
if (enabled) {
toolGroup.setToolActive(toolName);
} else {
toolGroup.setToolDisabled(toolName);
}
});
},