Skip to content

[Bug] hideWhenDisabled evaluate property flag not working #5587

Description

@jbocce

Describe the Bug

There is at least one instance in which the hideWhenDisabled flag is not working as expected. This particular case is for the 'evaluate.modality.supported' evaluator when applied to the UltrasoundDirectionalTool. The problem may be more general, but this is the only instance/example tried.

Steps to Reproduce

  1. In the toolbarButtons.ts file for basic mode, add the hideWhenDisabled: true flag as an evaluator property like this...
  {
    id: 'UltrasoundDirectionalTool',
    uiType: 'ohif.toolButton',
    props: {
      icon: 'icon-tool-ultrasound-bidirectional',
      label: i18n.t('Buttons:Ultrasound Directional'),
      tooltip: i18n.t('Buttons:Ultrasound Directional'),
      commands: setToolActiveToolbar,
      evaluate: [
        'evaluate.cornerstoneTool',
        {
          name: 'evaluate.modality.supported',
          supportedModalities: ['US'],
          hideWhenDisabled: true,
        },
      ],
    },
  },
  1. Run OHIF and display a non US study.

The current behavior

The UltrasoundDirectionalTool is displayed in the more tools menu.

The expected behavior

The UltrasoundDirectionalTool is NOT displayed in the more tools menu.

System Information

System:
OS: Windows 11 10.0.26200
CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
Memory: 8.30 GB / 31.68 GB
Binaries:
Node: 23.9.0 - C:\Users\joebo\AppData\Local\fnm_multishells\34000_1764094687187\node.EXE
Yarn: 1.22.22 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 10.9.2 - C:\Users\joebo\AppData\Local\fnm_multishells\34000_1764094687187\npm.CMD
bun: 1.2.23 - C:\Users\joebo.bun\bin\bun.EXE
Browsers:
Chrome: 142.0.7444.176
Edge: Chromium (140.0.3485.54)
Firefox: 143.0.4 - C:\Program Files\Mozilla Firefox\firefox.exe
Internet Explorer: 11.0.26100.1882

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugsBug reported, reproducible, and verified.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions