From fbe11e06b43714aa286a307f12f185d33ba4c5ca Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Fri, 29 Sep 2017 12:30:05 +0300 Subject: [PATCH] Stop click event propagation if something was selected refs #7518 Change-Id: I78466af81c8d7215c198293c016ea641707dc3b1 --- .../diagram/participant/pointertool/PointerInteractor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/pointertool/PointerInteractor.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/pointertool/PointerInteractor.java index 33b4402db..fc0f35cb0 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/pointertool/PointerInteractor.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/pointertool/PointerInteractor.java @@ -472,6 +472,8 @@ public class PointerInteractor extends AbstractDiagramParticipant { } return false; } + + boolean result = false; // Click Select { @@ -511,6 +513,8 @@ public class PointerInteractor extends AbstractDiagramParticipant { if (!Collections.singleton(selectedPick).equals(currentSelection) && (isLeft || (isRight && !currentSelection.contains(selectedPick)))) { selection.setSelection(selectionId, selectedPick); + // Stop propagation + result = true; } if (isRight && pickables.size() == 1 && noModifiers) { @@ -518,7 +522,7 @@ public class PointerInteractor extends AbstractDiagramParticipant { } } - return false; + return result; } /** -- 2.47.1