diff --git a/platform/platform-api/src/com/intellij/ui/dualView/DualView.java b/platform/platform-api/src/com/intellij/ui/dualView/DualView.java index 285e0bac6ed2..6fbb14f8fc7c 100644 --- a/platform/platform-api/src/com/intellij/ui/dualView/DualView.java +++ b/platform/platform-api/src/com/intellij/ui/dualView/DualView.java @@ -72,6 +72,7 @@ public class DualView extends JPanel { private final PropertyChangeListener myPropertyChangeListener; private boolean myZipByHeight; + private boolean mySuppressStore; public DualView(Object root, DualViewColumnInfo[] columns, @NonNls String columnServiceKey, Project project) { super(new CardLayout()); @@ -87,7 +88,7 @@ public class DualView extends JPanel { add(createFlatComponent(columns), FLAT); - (myTreeView.getTreeViewModel()).addTreeModelListener(new TreeModelListener() { + myTreeView.getTreeViewModel().addTreeModelListener(new TreeModelListener() { public void treeNodesInserted(TreeModelEvent e) { refreshFlatModel(); } @@ -113,6 +114,7 @@ public class DualView extends JPanel { myPropertyChangeListener = new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { + if (mySuppressStore) return; saveState(); } }; @@ -202,6 +204,17 @@ public class DualView extends JPanel { public TableCellRenderer getCellRenderer(int row, int column) { return createWrappedRenderer(super.getCellRenderer(row, column)); } + + @Override + public void doLayout() { + try { + mySuppressStore = true; + super.doLayout(); + } + finally { + mySuppressStore = false; + } + } }; myTreeView.getTree().getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION); JPanel result = new JPanel(new BorderLayout()); @@ -235,6 +248,22 @@ public class DualView extends JPanel { } return c; } + + @Override + public void doLayout() { + try { + mySuppressStore = true; + super.doLayout(); + } + finally { + mySuppressStore = false; + } + } + + @Override + public void updateColumnSizes() { + // suppress automatic layout, use stored values instead + } }; myFlatView.setCellSelectionEnabled(false); myFlatView.setColumnSelectionAllowed(false); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java index 44d971832485..a1b375ebd0c9 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/history/FileHistoryPanelImpl.java @@ -168,7 +168,7 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton { @Override public String getPreferredStringValue() { - return "123.4567"; + return StringUtil.repeatSymbol('m', 10); } } @@ -189,7 +189,7 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton { @Override public String getPreferredStringValue() { - return DateFormatUtil.formatPrettyDateTime(Clock.getTime()); + return DateFormatUtil.formatPrettyDateTime(Clock.getTime() + 1000); } } @@ -281,7 +281,7 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton { @Override @NonNls public String getPreferredStringValue() { - return "author_author"; + return StringUtil.repeatSymbol('m', 14); } } @@ -314,7 +314,7 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton { @Override public String getPreferredStringValue() { - return StringUtil.repeatSymbol('a', 125); + return StringUtil.repeatSymbol('m', 80); } public TableCellRenderer getRenderer(VcsFileRevision p0) { @@ -558,18 +558,10 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton { wrapWithTreeElements(myHistorySession.getRevisionList())), myTargetSelection); } - columnSizesOnce(); myDualView.expandAll(); myDualView.repaint(); } - private void columnSizesOnce() { - if (! myColumnSizesSet) { - myDualView.getFlatView().updateColumnSizes(); - myColumnSizesSet = true; - } - } - private void adjustEmptyText() { VirtualFile virtualFile = myFilePath.getVirtualFile(); if ((virtualFile == null || !virtualFile.isValid()) && !myFilePath.getIOFile().exists()) { @@ -800,7 +792,6 @@ public class FileHistoryPanelImpl extends PanelWithActionsAndCloseButton { mySplitter.repaint(); myRefresherI.run(true, useLastRevision); - columnSizesOnce(); } }.callMe(); }