Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Redor2020-10-29 08:02:49 +0000
committerLaurent Redor2020-11-06 08:42:17 +0000
commit1ecf269c144463b716469c6520346e6178400025 (patch)
tree1dbd8247b853f3adb1faea742f3888f99290575e
parentfce346e996a812ec3beed499bbf3da4d85925b96 (diff)
downloadorg.eclipse.sirius-1ecf269c144463b716469c6520346e6178400025.tar.gz
org.eclipse.sirius-1ecf269c144463b716469c6520346e6178400025.tar.xz
org.eclipse.sirius-1ecf269c144463b716469c6520346e6178400025.zip
[568037] Handle ELK arrange all case with only one child in the diagram
Bug: 568037 Change-Id: I5db50cc412f74d3393406271ba8df1e5a8e60c2f Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.elk/src/org/eclipse/sirius/diagram/elk/ElkDiagramLayoutConnector.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.elk/src/org/eclipse/sirius/diagram/elk/ElkDiagramLayoutConnector.java b/plugins/org.eclipse.sirius.diagram.elk/src/org/eclipse/sirius/diagram/elk/ElkDiagramLayoutConnector.java
index 424bb1b102..ccbc8bb341 100644
--- a/plugins/org.eclipse.sirius.diagram.elk/src/org/eclipse/sirius/diagram/elk/ElkDiagramLayoutConnector.java
+++ b/plugins/org.eclipse.sirius.diagram.elk/src/org/eclipse/sirius/diagram/elk/ElkDiagramLayoutConnector.java
@@ -371,7 +371,12 @@ public class ElkDiagramLayoutConnector implements IDiagramLayoutConnector {
layoutRootPart = (IGraphicalEditPart) parent;
}
} else if (!(object instanceof ConnectionEditPart)) {
- layoutRootPart = (IGraphicalEditPart) object;
+ if (selection.size() == 1 && isArrangeAll) {
+ // Specific case of arrange all launch on a diagram with only one children
+ layoutRootPart = getTopGraphicParentEditPartIfPresent((IGraphicalEditPart) object);
+ } else {
+ layoutRootPart = (IGraphicalEditPart) object;
+ }
}
}
}

Back to the top