Skip to content

Unified Selection event to re-state selection #1472

Description

Our application allows for interactive review of changes made to an iModel. Elements are constantly added to and removed from the iModel visible in the Viewport. All possible changes are still stored on our end, meaning it's normal for us to have references to elements that do not exist in the iModel, but that can be added at any time.
This means that sometimes our internal selection state tracks elements that do not exist in the iModel as 'selected' in one of our tables. This is completely intentional, but from the user side this leads can lead to some issues. For example, it's expected that clicking anywhere on the background of the Viewport (and not hitting an element) will deselect all elements. Unfortunately, since the tracked element doesn't exist in the iModel and wasn't selected there, nothing is deselected, the selection state is not changed, and no event is fired. Other adjacent issues that I won't go into detail about also show up because of this.

What I'd like to propose is some kind of Selection event to simply re-state what is currently selected on any given click of the Viewport. That way we'd know that some sort of interaction happened, and could refresh our internal state accordingly, even if no element selection was actually changed in the iModel.
Would something like this be possible?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions