]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Stop click event propagation if something was selected 58/1058/1
authorAntti Villberg <antti.villberg@semantum.fi>
Fri, 29 Sep 2017 09:30:05 +0000 (12:30 +0300)
committerAntti Villberg <antti.villberg@semantum.fi>
Fri, 29 Sep 2017 09:30:05 +0000 (12:30 +0300)
refs #7518

Change-Id: I78466af81c8d7215c198293c016ea641707dc3b1

bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/pointertool/PointerInteractor.java

index 33b4402db56b46dfc738a5aea43f17445133318d..fc0f35cb0b2900a58c728812a3ae8b3d89b7d1a2 100644 (file)
@@ -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;
     }
 
     /**