From: Antti Villberg Date: Fri, 29 Sep 2017 09:30:05 +0000 (+0300) Subject: Stop click event propagation if something was selected X-Git-Tag: v1.31.0~161 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=fbe11e06b43714aa286a307f12f185d33ba4c5ca;p=simantics%2Fplatform.git Stop click event propagation if something was selected refs #7518 Change-Id: I78466af81c8d7215c198293c016ea641707dc3b1 --- 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; } /**