Skip to content

Commit

Permalink
[3645] Propagate a pseudo selection change when re-selecting a repres…
Browse files Browse the repository at this point in the history
…entation

Bug: #3645
Signed-off-by: Pierre-Charles David <[email protected]>
  • Loading branch information
pcdavid committed Jun 19, 2024
1 parent 9ebb240 commit fbad3ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ More existing APIs will be migrated to this new common pattern.
- https://github.com/eclipse-sirius/sirius-web/issues/3628[#3628] [sirius-web] Restore support for expand all and reveal in the explorer
- https://github.com/eclipse-sirius/sirius-web/issues/3616[#3616] [diagram] Fix potential exceptions due to duplicate keys in diagram event processing
- https://github.com/eclipse-sirius/sirius-web/issues/3624[#3624] [diagram] Fix an issue where the header separator does not fill the entire width of the node
- https://github.com/eclipse-sirius/sirius-web/issues/3645[#3645] [core] Fix a regression where clicking on an already selected representation did not re-open it

=== New Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ export const SelectionContextProvider = ({ initialSelection, children }: Selecti
.map((entry) => entry.id)
.sort()
.join(':');
if (prevSelectionKey !== newSelectionKey) {
if (
prevSelectionKey !== newSelectionKey ||
selection.entries.find((entry) => entry.kind.startsWith('siriusComponents://representation?type='))
) {
return { ...prevState, selection };
} else {
return prevState;
Expand Down

0 comments on commit fbad3ee

Please sign in to comment.