Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Redor2021-10-15 17:10:28 +0000
committerLaurent Redor2021-10-19 10:00:34 +0000
commit1e964cb7d05951ad3b52c832206403ef03e386e1 (patch)
tree636ad430f47e547e725f329cefdf7aed078a3574
parent80bf33029a792120e573f19554668791122e9128 (diff)
downloadorg.eclipse.sirius-1e964cb7d05951ad3b52c832206403ef03e386e1.tar.gz
org.eclipse.sirius-1e964cb7d05951ad3b52c832206403ef03e386e1.tar.xz
org.eclipse.sirius-1e964cb7d05951ad3b52c832206403ef03e386e1.zip
[576722] 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: 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 012ee87d3c..18afe645ac 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
@@ -365,8 +365,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