IDEA-203161 SOE at ThreeComponentsSplitter on attempt to open Run tool window in certain Gradle-based projects

This commit is contained in:
Vassiliy.Kudryashov
2018-11-30 21:07:03 +03:00
parent a5b961ced4
commit 39f631f2cb
2 changed files with 7 additions and 3 deletions
@@ -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);
}
}
}
}
@@ -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();
}