diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/VcsLogUiImpl.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/VcsLogUiImpl.java index 440b3efd1a9a..98478881d336 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/VcsLogUiImpl.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/VcsLogUiImpl.java @@ -76,20 +76,21 @@ public class VcsLogUiImpl implements VcsLogUi, Disposable { public void setVisiblePack(@NotNull VisiblePack pack) { ApplicationManager.getApplication().assertIsDispatchThread(); + PermanentGraph previousPermGraph = myVisiblePack.getPermanentGraph(); TIntHashSet previouslySelected = getSelectedCommits(); - PermanentGraph previousPermGraph = myVisiblePack.getPermanentGraph(); myVisiblePack = pack; - boolean permGraphChanged = previousPermGraph != myVisiblePack.getPermanentGraph(); GraphTableModel currentModel = getModel(); if (currentModel == null) { - GraphTableModel newModel = new GraphTableModel(myVisiblePack, myLogDataHolder, this); - setModel(newModel, myVisiblePack.getVisibleGraph(), previouslySelected); + VcsLogGraphTable table = getTable(); + table.setModel(new GraphTableModel(myVisiblePack, myLogDataHolder, this)); + table.setPaintBusy(false); } else { currentModel.setVisiblePack(myVisiblePack); + restoreSelection(currentModel, myVisiblePack.getVisibleGraph(), previouslySelected, getTable()); } myMainFrame.updateDataPack(myVisiblePack); setLongEdgeVisibility(myUiProperties.areLongEdgesVisible()); @@ -102,15 +103,6 @@ public class VcsLogUiImpl implements VcsLogUi, Disposable { return myMainFrame; } - private void setModel(@NotNull GraphTableModel newModel, - @NotNull VisibleGraph newVisibleGraph, - @NotNull TIntHashSet previouslySelectedCommits) { - final VcsLogGraphTable table = getTable(); - table.setModel(newModel); - restoreSelection(newModel, newVisibleGraph, previouslySelectedCommits, table); - table.setPaintBusy(false); - } - private static void restoreSelection(@NotNull GraphTableModel newModel, @NotNull VisibleGraph newVisibleGraph, @NotNull TIntHashSet previouslySelectedCommits, @@ -243,7 +235,9 @@ public class VcsLogUiImpl implements VcsLogUi, Disposable { } } - private void jumpTo(@NotNull final T commitId, @NotNull final PairFunction rowGetter, @NotNull final SettableFuture future) { + private void jumpTo(@NotNull final T commitId, + @NotNull final PairFunction rowGetter, + @NotNull final SettableFuture future) { if (future.isCancelled()) return; GraphTableModel model = getModel(); diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/tables/GraphTableModel.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/tables/GraphTableModel.java index 5e83503e81d2..476bab69af06 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/tables/GraphTableModel.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/tables/GraphTableModel.java @@ -246,6 +246,7 @@ public class GraphTableModel extends AbstractTableModel { public void setVisiblePack(@NotNull VisiblePack visiblePack) { myDataPack = visiblePack; + myMoreRequested = false; fireTableDataChanged(); } }