From d3896aa011fffb2311dcdfb6f96429d6c5f0cd49 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Tue, 25 Nov 2014 17:08:27 +0100 Subject: [PATCH] don't create panel for titlePane if not needed --- .../src/com/intellij/openapi/ui/DialogWrapper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java index 00bf9d23c16c..e3a2e9757f97 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java @@ -1204,11 +1204,11 @@ public abstract class DialogWrapper { }; toggleShowOptions.registerCustomShortcutSet(sc, root); - final JPanel northSection = new JPanel(new BorderLayout()); - root.add(northSection, BorderLayout.NORTH); - JComponent titlePane = createTitlePane(); if (titlePane != null) { + JPanel northSection = new JPanel(new BorderLayout()); + root.add(northSection, BorderLayout.NORTH); + northSection.add(titlePane, BorderLayout.CENTER); }