Skip to content

Commit

Permalink
[2605] Unselect node or edge if explorer selection doesn't match any …
Browse files Browse the repository at this point in the history
…diagram element

Bug: #2605
Signed-off-by: Florian ROUËNÉ <florian.rouene@obeosoft.com>
  • Loading branch information
frouene authored and sbegaudeau committed Dec 5, 2023
1 parent ba3237e commit 12e1e10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ The only way to export diagram as SVG image is to use the ReactFlow toolbar loca
- https://github.com/eclipse-sirius/sirius-web/issues/2683[#2683] [diagram] Hide diagram element palette when the element itself is moved.
- https://github.com/eclipse-sirius/sirius-web/issues/2689[#2689] [diagram] Fix the borderNode moves that is no longer anchored to its parent.
- https://github.com/eclipse-sirius/sirius-web/issues/2682[#2682] [diagram] Fix an error in diagram selection that can lead to a node remaining selected in the diagram but not in the explorer.
- https://github.com/eclipse-sirius/sirius-web/issues/2605[#2605] [diagram] Fix an issue that prevents last node or edge to remain selected if the new selection is not displayed on the diagram.

=== New Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ export const useDiagramSelection = (
duration: 1000,
});
}
} else {
const reactFlowState = store.getState();
reactFlowState.unselectNodesAndEdges();
}
}, [selection]);

Expand Down

0 comments on commit 12e1e10

Please sign in to comment.