From b4bee1de6386cf9d1bd0dc6e924de98afbc4b289 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Mon, 12 Mar 2018 23:13:56 +0300 Subject: [PATCH] IDEA-185543 do not ignore a footer height if popup is not shown yet --- .../src/com/intellij/ui/popup/AbstractPopup.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java b/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java index bf8417cc815c..cb7d535e2e49 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/AbstractPopup.java @@ -1592,20 +1592,18 @@ public class AbstractPopup implements JBPopup { private void setSize(Dimension size, boolean adjustByContent) { if (isBusy()) return; - Dimension toSet = size; + Dimension toSet = new Dimension(size); + if (adjustByContent) toSet.height += getAdComponentHeight(); if (myPopup == null) { myForcedSize = toSet; } else { - if (adjustByContent) { - toSet.height += getAdComponentHeight(); - } updateMaskAndAlpha(setSize(myContent, toSet)); } } private int getAdComponentHeight() { - return myAdComponent != null && myAdComponent.isShowing() ? myAdComponent.getPreferredSize().height + JBUI.scale(1) : 0; + return myAdComponent != null ? myAdComponent.getPreferredSize().height + JBUI.scale(1) : 0; } @Override