From d0869030dcae812f1e3b993e647b4c9c8a2ba59a Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Fri, 25 May 2018 19:43:48 +0300 Subject: [PATCH] IDEA-192720 vcs: do not lose selection in "Local Changes" on Menu keypress --- .../openapi/vcs/changes/ui/ChangesTree.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java index cf4c30e1e813..95fec42e3ebb 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java @@ -693,14 +693,15 @@ public abstract class ChangesTree extends Tree implements DataProvider { @Override protected void processMouseEvent(MouseEvent e) { if (e.getID() == MouseEvent.MOUSE_PRESSED) { - if (!isEnabled()) return; - int row = getRowForLocation(e.getX(), e.getY()); - if (row >= 0) { - final Rectangle baseRect = getRowBounds(row); - baseRect.setSize(myCheckboxWidth, baseRect.height); - if (baseRect.contains(e.getPoint())) { - setSelectionRow(row); - toggleChanges(getSelectedUserObjects()); + if (myShowCheckboxes && isEnabled() && !e.isPopupTrigger()) { + int row = getRowForLocation(e.getX(), e.getY()); + if (row >= 0) { + final Rectangle baseRect = getRowBounds(row); + baseRect.setSize(myCheckboxWidth, baseRect.height); + if (baseRect.contains(e.getPoint())) { + setSelectionRow(row); + toggleChanges(getSelectedUserObjects()); + } } } }