diff --git a/platform/lang-impl/src/com/intellij/build/BuildTreeConsoleView.java b/platform/lang-impl/src/com/intellij/build/BuildTreeConsoleView.java index e1d4b9fdf7f2..6cc66d2c9903 100644 --- a/platform/lang-impl/src/com/intellij/build/BuildTreeConsoleView.java +++ b/platform/lang-impl/src/com/intellij/build/BuildTreeConsoleView.java @@ -211,7 +211,9 @@ public class BuildTreeConsoleView implements ConsoleView, DataProvider, BuildCon int lastSize = getLastSize(); if (firstSize == 0 && lastSize == 0) { int width = Math.round(getWidth() / 2f); - setFirstSize(width); + if (width > 0) { + setFirstSize(width); + } } } } diff --git a/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java b/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java index bf7db8c96ba2..3dd3432f19d7 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java @@ -494,16 +494,18 @@ public class ThreeComponentsSplitter extends JPanel implements Disposable { public void setFirstSize(final int size) { + int oldSize = myFirstSize; myFirstSize = Math.max(getMinSize(true), size); - if (firstVisible()) { + if (firstVisible() && oldSize != myFirstSize) { doLayout(); repaint(); } } public void setLastSize(final int size) { + int oldSize = myLastSize; myLastSize = Math.max(getMinSize(false), size); - if (lastVisible()) { + if (lastVisible() && oldSize != myLastSize) { doLayout(); repaint(); }