From 5fd939147253c7fbff2b6f0b9f495edd297cf414 Mon Sep 17 00:00:00 2001 From: fgnm Date: Sun, 24 Sep 2023 13:48:56 +0200 Subject: [PATCH] [editor only] Fix NPE when middle click vertex point --- .../rednblack/editor/view/ui/followers/PolygonFollower.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/games/rednblack/editor/view/ui/followers/PolygonFollower.java b/src/main/java/games/rednblack/editor/view/ui/followers/PolygonFollower.java index 21fec3e0..e0480f06 100644 --- a/src/main/java/games/rednblack/editor/view/ui/followers/PolygonFollower.java +++ b/src/main/java/games/rednblack/editor/view/ui/followers/PolygonFollower.java @@ -317,7 +317,7 @@ public class PolygonFollower extends SubFollower { @Override public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) { if (super.touchDown(event, x, y, pointer, button)) { - if(button != Input.Buttons.LEFT) return true; + if(button == Input.Buttons.RIGHT) return true; PolyVertex vertex = (PolyVertex) event.getListenerActor(); draggingAnchorId = vertex.getIndex();