Skip to content

Commit

Permalink
[426] Border nodes are wrongly considered in GMFHelper.getBottomRight
Browse files Browse the repository at this point in the history
Because of typo, the border nodes are considered in
org.eclipse.sirius.diagram.ui.internal.refresh.GMFHelper.getBottomRight(Node)
when they should be ignored.

Bug: #426
  • Loading branch information
lredor committed Jul 9, 2024
1 parent a9527cd commit a5630b3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2023 THALES GLOBAL SERVICES and others.
* Copyright (c) 2011, 2024 THALES GLOBAL SERVICES and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -274,7 +274,7 @@ public static Dimension getBorderSize(DDiagramElementContainer ddec) {
*/
private static void translateWithInsets(Point locationToTranslate, Node currentNode) {
NodeQuery nodeQuery = new NodeQuery(currentNode);
// bordered node are not concerned by those insets.
// Border nodes are not concerned by those insets.
if (!nodeQuery.isBorderedNode()) {
locationToTranslate.translate(getContainerTopLeftInsets(currentNode, false));
}
Expand Down Expand Up @@ -789,8 +789,8 @@ public static Point getBottomRight(Node node) {
int bottom = 0;
for (Iterator<Node> children = Iterators.filter(node.getChildren().iterator(), Node.class); children.hasNext(); /* */) {
Node child = children.next();
// The bordered nodes is ignored
if (!(new NodeQuery(node).isBorderedNode())) {
// The border nodes are ignored
if (!(new NodeQuery(child).isBorderedNode())) {
Rectangle bounds = getBounds(child);
Point bottomRight = bounds.getBottomRight();
if (bottomRight.x > right) {
Expand Down

0 comments on commit a5630b3

Please sign in to comment.