diff --git a/src/main/java/drawingbot/render/overlays/ShapeListOverlays.java b/src/main/java/drawingbot/render/overlays/ShapeListOverlays.java index d88162ea..341aad03 100644 --- a/src/main/java/drawingbot/render/overlays/ShapeListOverlays.java +++ b/src/main/java/drawingbot/render/overlays/ShapeListOverlays.java @@ -199,8 +199,8 @@ public void onShapeDisplayed(JFXShape shape){ if(getViewport() == null){ return; } - shape.jfxShape.getTransforms().add(getViewport().getCanvasToViewportTransform()); - shape.jfxShape.getTransforms().add(getMaskToCanvasTransform()); + shape.jfxShape.getTransforms().add(0, getViewport().getCanvasToViewportTransform()); + shape.jfxShape.getTransforms().add(1, getMaskToCanvasTransform()); shape.jfxShape.strokeWidthProperty().bind(strokeWidthProperty()); shape.jfxShape.setOnMousePressed(e -> onSelectableClicked(shape, e)); getViewport().getBackgroundOverlayNodes().add(shape.jfxShape);