Skip to content

Commit

Permalink
[3645] Revert earlier change in selection propagation which caused re…
Browse files Browse the repository at this point in the history
…gressions

Bug: #3645
Signed-off-by: Pierre-Charles David <[email protected]>
  • Loading branch information
pcdavid committed Jun 19, 2024
1 parent 9ebb240 commit 1072f1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ image:doc/screenshots/insideLabelPositions.png[Inside label positions, 70%]
- https://github.com/eclipse-sirius/sirius-web/issues/3606[#3606] [test] Improve error handling in ExecuteEditingContextFunctionRunner and ExecuteEditingContextFunctionEventHandler
- https://github.com/eclipse-sirius/sirius-web/issues/3561[#3561] [diagram] Add support for background and border on diagram labels
- https://github.com/eclipse-sirius/sirius-web/issues/3604[#3604] [diagram] Make node overlap resolution faster during "Arrange All"
- https://github.com/eclipse-sirius/sirius-web/issues/3645[#3645] [core] Revert earlier change made in #3595 which caused regressions

== v2024.5.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,7 @@ export const SelectionContextProvider = ({ initialSelection, children }: Selecti
});

const setSelection = useCallback((selection: Selection) => {
setState((prevState) => {
const prevSelectionKey = prevState.selection.entries
.map((entry) => entry.id)
.sort()
.join(':');
const newSelectionKey = selection.entries
.map((entry) => entry.id)
.sort()
.join(':');
if (prevSelectionKey !== newSelectionKey) {
return { ...prevState, selection };
} else {
return prevState;
}
});
setState((prevState) => ({ ...prevState, selection }));
}, []);

return (
Expand Down

0 comments on commit 1072f1c

Please sign in to comment.