From cf894e88ef08318a2e8504ccf022c73a93705032 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Tue, 20 Oct 2015 16:31:24 +0300 Subject: [PATCH] IDEA-146484 vcs: history - do not register doubleclick shortcut on commit message area --- .../openapi/vcs/history/FileHistoryPanelImpl.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java index 1762a54e5207..a1be75afdf93 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java @@ -641,6 +641,8 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton { myDualView.setCellWrapper(new MyCellWrapper(sessionGetter)); + myDualView.installDoubleClickHandler(new MyDiffAction()); + final TableView flatView = myDualView.getFlatView(); TableViewModel sortableModel = flatView.getTableViewModel(); sortableModel.setSortable(true); @@ -768,19 +770,9 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton { } final MyDiffAction diffAction = new MyDiffAction(); + diffAction.registerCustomShortcutSet(CommonShortcuts.getDiff(), null); result.add(diffAction); - if (!popup) { - List shortcuts = new SmartList(); - ContainerUtil.addAll(shortcuts, CommonShortcuts.getDiff().getShortcuts()); - ContainerUtil.addAll(shortcuts, CommonShortcuts.DOUBLE_CLICK_1.getShortcuts()); - CustomShortcutSet shortcutSet = new CustomShortcutSet(ContainerUtil.toArray(shortcuts, new Shortcut[shortcuts.size()])); - diffAction.registerCustomShortcutSet(shortcutSet, myDualView.getFlatView()); - diffAction.registerCustomShortcutSet(shortcutSet, myDualView.getTreeView()); - } - else { - diffAction.registerCustomShortcutSet(CommonShortcuts.getDiff(), this); - } result.add(ActionManager.getInstance().getAction("Vcs.ShowDiffWithLocal")); final AnAction diffGroup = ActionManager.getInstance().getAction(VCS_HISTORY_ACTIONS_GROUP);