You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/11/20 09:24:16 UTC

[GitHub] sdedic closed pull request #1023: NETBEANS-1698: Listview only performs action on left-doubleclick. Con…

sdedic closed pull request #1023: NETBEANS-1698: Listview only performs action on left-doubleclick. Con…
URL: https://github.com/apache/incubator-netbeans/pull/1023
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/platform/openide.awt/src/org/openide/awt/MouseUtils.java b/platform/openide.awt/src/org/openide/awt/MouseUtils.java
index d349b7f988..0d61232e62 100644
--- a/platform/openide.awt/src/org/openide/awt/MouseUtils.java
+++ b/platform/openide.awt/src/org/openide/awt/MouseUtils.java
@@ -76,6 +76,10 @@ public static boolean isDoubleClick(MouseEvent e) {
         if ((e.getID() != MouseEvent.MOUSE_CLICKED) || (e.getClickCount() == 0)) {
             return false;
         }
+        // do not report already consumed events
+        if (e.isConsumed()) {
+            return false;
+        }
 
         return ((e.getClickCount() % 2) == 0) || isDoubleClickImpl(e);
     }
diff --git a/platform/openide.explorer/src/org/openide/explorer/view/ListView.java b/platform/openide.explorer/src/org/openide/explorer/view/ListView.java
index 59bcbaab97..5c1819d5a9 100644
--- a/platform/openide.explorer/src/org/openide/explorer/view/ListView.java
+++ b/platform/openide.explorer/src/org/openide/explorer/view/ListView.java
@@ -1301,7 +1301,7 @@ public PopupSupport() {}
 
         @Override
         public void mouseClicked(MouseEvent e) {
-            if (MouseUtils.isDoubleClick(e)) {
+            if (SwingUtilities.isLeftMouseButton(e) && MouseUtils.isDoubleClick(e)) {
                 int index = list.locationToIndex(e.getPoint());
                 performObjectAt(index, e.getModifiers());
             }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists