summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorRobin Stocker2012-03-12 13:56:57 (EDT)
committer Kevin Sawicki2012-03-12 13:56:57 (EDT)
commita1c9c977431367b1b808bc921ab10b9a6d524b78 (patch)
treec2d39cd979cee5f979a3b043ce1b47e8ffa1641a
parentba6ec345667b074b39150d3528d2e02ab21bc105 (diff)
downloadegit-a1c9c977431367b1b808bc921ab10b9a6d524b78.zip
egit-a1c9c977431367b1b808bc921ab10b9a6d524b78.tar.gz
egit-a1c9c977431367b1b808bc921ab10b9a6d524b78.tar.bz2
[historyView] Disable Show Annotations if selection is emptyrefs/changes/28/5328/3
It was previously always enabled even when no file was selected. Change-Id: Ide1900d18ddfa3ba37cb93de7e5cbba7b17cb8fd Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Kevin Sawicki <kevin@github.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java
index 0ec9e78..de4c504 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java
@@ -325,10 +325,11 @@ public class CommitFileDiffViewer extends TableViewer {
copy.setEnabled(!sel.isEmpty());
if (!submoduleSelected) {
- open.setEnabled(!sel.isEmpty());
- openWorkingTreeVersion.setEnabled(!sel.isEmpty());
+ boolean oneOrMoreSelected = !sel.isEmpty();
+ open.setEnabled(oneOrMoreSelected);
+ openWorkingTreeVersion.setEnabled(oneOrMoreSelected);
compare.setEnabled(sel.size() == 1);
- blame.setEnabled(true);
+ blame.setEnabled(oneOrMoreSelected);
if (sel.size() == 1) {
FileDiff diff = (FileDiff) sel.getFirstElement();
String path = new Path(getRepository().getWorkTree()