diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/MainFrame.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/MainFrame.java index a0f54b72aba4..8f04fe6dd3a6 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/MainFrame.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/MainFrame.java @@ -339,7 +339,8 @@ public class MainFrame extends JPanel implements TypeSafeDataProvider { } @Override - public void valueChanged(@Nullable ListSelectionEvent notUsed) { + public void valueChanged(@Nullable ListSelectionEvent event) { + if (event != null && event.getValueIsAdjusting()) return; int rows = getGraphTable().getSelectedRowCount(); if (rows < 1 || rows > MAX_SELECTED_COMMITS) { myChangesLoadingPane.stopLoading(); diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/VcsLogGraphTable.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/VcsLogGraphTable.java index ad709f9eda9e..5ff2848c95d7 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/VcsLogGraphTable.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/VcsLogGraphTable.java @@ -510,6 +510,7 @@ public class VcsLogGraphTable extends JBTable implements TypeSafeDataProvider, C public void restore(@NotNull VisibleGraph newVisibleGraph, boolean scrollToSelection) { Pair toSelectAndScroll = findRowsToSelectAndScroll(myTable.getGraphTableModel(), newVisibleGraph); if (!toSelectAndScroll.first.isEmpty()) { + myTable.getSelectionModel().setValueIsAdjusting(true); toSelectAndScroll.first.forEach(new TIntProcedure() { @Override public boolean execute(int row) { @@ -517,7 +518,7 @@ public class VcsLogGraphTable extends JBTable implements TypeSafeDataProvider, C return true; } }); - + myTable.getSelectionModel().setValueIsAdjusting(false); } if (scrollToSelection) { if (myScrollToTop) {