Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Redor2021-10-15 17:10:28 +0000
committerLaurent Redor2021-11-03 08:03:49 +0000
commit61056d7b76f023b6cd12d4a16333e21a3b53875c (patch)
treee856177b9e62b7925399ee512a1230e661c3513d
parent8411bccec67cb6839fa157ce0e402e0e932789ec (diff)
downloadorg.eclipse.sirius-61056d7b76f023b6cd12d4a16333e21a3b53875c.tar.gz
org.eclipse.sirius-61056d7b76f023b6cd12d4a16333e21a3b53875c.tar.xz
org.eclipse.sirius-61056d7b76f023b6cd12d4a16333e21a3b53875c.zip
[577025] Fix z-order regression
Since the z-order (bugzilla 574273), there is a potential regression that occurs in a context of "unsynchronized diagrams". It seems possible that the method AbstractDDiagramEditPart.refreshChildren() is called with some edges that are visible at the GMF level but without a corresponding edit part. I think that it is a temporary state but this method must handle it. A corresponding test will be added later, when the causes will be better understood. Bug: 577025 Cherry-picked-from: 576722 Change-Id: I01dedc16aec1eb353b481020a3d35fe0bed2081c Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDDiagramEditPart.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDDiagramEditPart.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDDiagramEditPart.java
index ae231a9bc8..00314e5415 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDDiagramEditPart.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDDiagramEditPart.java
@@ -366,8 +366,10 @@ public abstract class AbstractDDiagramEditPart extends DiagramEditPart implement
((SiriusPolylineConnectionEx) figureToMove).refreshLine();
}
}
+ // Increase the GMF index only when a corresponding figure is found (to avoid a potential
+ // IndexOutOfBoundsException).
+ visibleGmfIndex++;
}
- visibleGmfIndex++;
}
}
}

Back to the top