fix(toolbox): Preserve user-specified tool state and streamline command execution (#4063)

This commit is contained in:
Alireza authored and GitHub committed 2024-04-29 11:58:03 -04:00
1 parent 4784638717
commit f1a736d193
34 files changed
+332 -181

No files matched your search

-15
View File
@@ -8,18 +8,6 @@ const setToolActiveToolbar = {
},
};
function _createSetToolActiveCommands(toolName) {
return [
{
commandName: 'setToolActiveToolbar',
commandOptions: {
toolName,
toolGroupIds: [toolGroupIds.CT, toolGroupIds.PT, toolGroupIds.Fusion],
},
},
];
}
const toolbarButtons = [
{
id: 'MeasurementTools',
@@ -144,7 +132,6 @@ const toolbarButtons = [
toolNames: ['CircularBrush', 'SphereBrush'],
disabledText: 'Create new segmentation to enable this tool.',
},
commands: _createSetToolActiveCommands('CircularBrush'),
options: [
{
name: 'Radius (mm)',
@@ -180,7 +167,6 @@ const toolbarButtons = [
name: 'evaluate.cornerstone.segmentation',
toolNames: ['CircularEraser', 'SphereEraser'],
},
commands: _createSetToolActiveCommands('CircularEraser'),
options: [
{
name: 'Radius (mm)',
@@ -216,7 +202,6 @@ const toolbarButtons = [
name: 'evaluate.cornerstone.segmentation',
toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'],
},
commands: _createSetToolActiveCommands('ThresholdCircularBrush'),
options: [
{
name: 'Radius (mm)',