Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2018-06-03 15:30:18 -0400
committerMatthias Sohn2018-06-04 17:34:41 -0400
commitd3b1c746f2bd1dce22cbc2c7d8f33237a3dc2b4e (patch)
tree05328496ab2712e96cd1f104a4ce08ee459f5ea0 /org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal
parentd9700cf14f6ffafdb58cdc8087e664159efdefc0 (diff)
downloadegit-d3b1c746f2bd1dce22cbc2c7d8f33237a3dc2b4e.tar.gz
egit-d3b1c746f2bd1dce22cbc2c7d8f33237a3dc2b4e.tar.xz
egit-d3b1c746f2bd1dce22cbc2c7d8f33237a3dc2b4e.zip
Reload commit info in history only if selection really changed
On a SelectionChangedEvent from the commit graph table we re-load the commit viewer and the file diffs. However, such an event is also received on Windows when the focus changes back to the commit graph table and the same commit is selected. Happens for instance also on a right click on the commit to bring up the context menu. When we're already showing information for that commit, there is no need to re-load it. Problem observed on Windows 10, all Eclipse versions at least since Neon 3 -- didn't try earlier versions. Change-Id: I0b9c9b1aa0906b744b8a0144b5d3d08d2fb73100 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
index 9a3a81001..0fbcbb7e9 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java
@@ -1441,6 +1441,9 @@ public class GitHistoryPage extends HistoryPage implements RefsChangedListener,
return;
}
final PlotCommit<?> c = (PlotCommit<?>) sel.getFirstElement();
+ if (c.equals(commentViewer.getInput())) {
+ return;
+ }
commentViewer.setInput(c);
final PlotWalk walk = new PlotWalk(input.getRepository());
try {

Back to the top