From d3b1c746f2bd1dce22cbc2c7d8f33237a3dc2b4e Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Sun, 3 Jun 2018 21:30:18 +0200 Subject: 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 --- .../src/org/eclipse/egit/ui/internal/history/GitHistoryPage.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'org.eclipse.egit.ui/src/org') 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 9a3a810014..0fbcbb7e9c 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 { -- cgit v1.2.3