Skip to content

Commit cbf07e7

Browse files
committed
[5762] Apply the selection requested by a tool to the workbench
Bug: #5762 Signed-off-by: Pierre-Charles David <[email protected]>
1 parent cbd5914 commit cbf07e7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Use `org.eclipse.emf.ecore.util.ECrossReferenceAdapter.getCrossReferenceAdapter(
6161
- https://github.com/eclipse-sirius/sirius-web/issues/5658[#5658] [diagram] Make labels non-draggable in read-only mode
6262
- https://github.com/eclipse-sirius/sirius-web/issues/5661[#5661] [diagram] Fix missing edge markers in SVG export
6363
- https://github.com/eclipse-sirius/sirius-web/issues/5755[#5755] [diagram] Fix an issue where EdgeCreationHandle was not rendered after an edge creation
64-
64+
- https://github.com/eclipse-sirius/sirius-web/issues/5762[#5762] [diagram] Fix an issue where the selection requested by a diagram tool was no longer applied globaly to the workbench
6565

6666
=== New Features
6767

packages/diagrams/frontend/sirius-components-diagrams/src/renderer/DiagramRenderer.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ export const DiagramRenderer = memo(({ diagramRefreshedEventPayload }: DiagramRe
232232
}
233233
});
234234
}
235-
}, [diagramRefreshedEventPayload, diagramDescription]);
235+
if (selectionFromTool) {
236+
setSelection(selectionFromTool);
237+
}
238+
}, [diagramRefreshedEventPayload, diagramDescription, setSelection]);
236239

237240
useEffect(() => {
238241
if (toolSelections.has(diagramRefreshedEventPayload.id)) {

0 commit comments

Comments
 (0)