Fixed ClassCastException when resizing in sketch diagram
diff --git a/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/SketchFeatureProvider.java b/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/SketchFeatureProvider.java
index a1c26b8..3032373 100644
--- a/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/SketchFeatureProvider.java
+++ b/tests/org.eclipse.graphiti.testtool.sketch/src/org/eclipse/graphiti/testtool/sketch/SketchFeatureProvider.java
@@ -348,15 +348,17 @@
return new LayoutPoolFeature(this);
} else {
boolean check = context.getPictogramElement() instanceof ContainerShape;
- ContainerShape cs = (ContainerShape) pe;
- List<Shape> children = cs.getChildren();
- if (!children.isEmpty()) {
- Shape firstChild = children.get(0);
- if (firstChild != null) {
- GraphicsAlgorithm ga = firstChild.getGraphicsAlgorithm();
- check = check && ga instanceof Ellipse;
- if (check) {
- return new LayoutContainerShapeGhostAndInnerShapeFeature(this);
+ if (check) {
+ ContainerShape cs = (ContainerShape) pe;
+ List<Shape> children = cs.getChildren();
+ if (!children.isEmpty()) {
+ Shape firstChild = children.get(0);
+ if (firstChild != null) {
+ GraphicsAlgorithm ga = firstChild.getGraphicsAlgorithm();
+ check = check && ga instanceof Ellipse;
+ if (check) {
+ return new LayoutContainerShapeGhostAndInnerShapeFeature(this);
+ }
}
}
}