Commit 6567d4ea authored by Aleksey Pivovarov's avatar Aleksey Pivovarov
Browse files

vcs: consume "Show Diff" shortcut in log if there are no changes

* avoid spurious invocation of other actions (ex: "Compare Files")
parent ff4c627a
Branches unavailable Tags unavailable
No related merge requests found
Showing with 2 additions and 1 deletion
+2 -1
......@@ -48,6 +48,7 @@ import javax.swing.border.Border;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import java.awt.*;
import java.awt.event.KeyEvent;
import java.io.File;
import java.util.*;
import java.util.List;
......@@ -369,7 +370,7 @@ public abstract class ChangesBrowserBase<T> extends JPanel implements TypeSafeDa
protected void buildToolBar(final DefaultActionGroup toolBarGroup) {
myDiffAction = new DumbAwareAction() {
public void update(AnActionEvent e) {
e.getPresentation().setEnabled(canShowDiff());
e.getPresentation().setEnabled(canShowDiff() || e.getInputEvent() instanceof KeyEvent);
}
public void actionPerformed(AnActionEvent e) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment