FoundryVTT-Sequencer icon indicating copy to clipboard operation
FoundryVTT-Sequencer copied to clipboard

[BUG] - bindVisibility does not work when attaching to MeasuredTemplates

Open 346184 opened this issue 1 year ago • 0 comments

Describe the bug Toggling the visibility of templates (by right clicking the templates icon) works for the template, but does not change the visibility of any attached Sequencer effects, even if they are attached and have bindVisibility set to true.

bindVisibility seems to currently hook sightRefresh, and it seems when MeasuredTemplate.hidden gets updated, only updateMeasuredTemplate gets called: https://github.com/fantasycalendar/FoundryVTT-Sequencer/blob/2a15af8ea35738d492f344e999aff2bc7ed8d987/src/canvas-effects/canvas-effect.js#L2081-L2102

To Reproduce Steps to reproduce the behavior:

  1. Create a persistent effect attached to a template with bound visibility
  2. Toggle the template's visibility
  3. See that the template got hidden, but the Sequencer effect remains unaffected

Expected behavior The Sequencer effect should be shown or hidden depending on the template it is attached to, if bindVisibility is enabled.

Setup:

  • Foundry Version: v11.308
  • System Version: 5E 2.3.0
  • Sequencer Version: Latest
  • Browser & version: Chrome, but should not matter

346184 avatar Sep 19 '23 12:09 346184