diff options
-rw-r--r-- | bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java index 1a2109575..29be3085b 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/GenericHistoryView.java @@ -458,7 +458,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP } public void setFocus() { - if (isLinkingEnabled()) { + if (isLinkingEnabled() && lastSelectedElement != null) { showLastSelectedElement(); } getCurrentPage().setFocus(); @@ -505,6 +505,7 @@ public class GenericHistoryView extends PageBookView implements IHistoryView, IP } public IHistoryPage showHistoryPageFor(Object object, boolean refresh, boolean force, IHistoryPageSource pageSource) { + lastSelectedElement= null; if (Policy.DEBUG_HISTORY) { String time = new SimpleDateFormat("m:ss.SSS").format(new Date(System.currentTimeMillis())); //$NON-NLS-1$ System.out.println(time + ": GenericHistoryView#showHistoryPageFor, the object to show is: " + object); //$NON-NLS-1$ |