From 10f8b605b98c296f83dbc840d262e113c6ef8a14 Mon Sep 17 00:00:00 2001 From: Dmitry Avdeev Date: Mon, 2 Nov 2020 17:21:38 +0300 Subject: [PATCH] IDEA-254134 [new run config UI] in Before Launch section it's impossible to add several tasks of the same type tags disposing fixed GitOrigin-RevId: eb1ddb01dbd9008d01955d887d4ea1b467bf6934 --- .../src/com/intellij/execution/ui/BeforeRunComponent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/execution-impl/src/com/intellij/execution/ui/BeforeRunComponent.java b/platform/execution-impl/src/com/intellij/execution/ui/BeforeRunComponent.java index 4ec6281c0f3d..104ff93f63c3 100644 --- a/platform/execution-impl/src/com/intellij/execution/ui/BeforeRunComponent.java +++ b/platform/execution-impl/src/com/intellij/execution/ui/BeforeRunComponent.java @@ -52,6 +52,7 @@ public final class BeforeRunComponent extends JPanel implements DnDTarget, Dispo public BeforeRunComponent(@NotNull Disposable parentDisposable) { super(new WrapLayout(FlowLayout.LEADING, 0, FragmentedSettingsBuilder.TAG_VGAP)); + Disposer.register(parentDisposable, this); add(Box.createVerticalStrut(30)); JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0)); @@ -67,7 +68,7 @@ public final class BeforeRunComponent extends JPanel implements DnDTarget, Dispo myAddPanel.add(myAddButton); myAddLabel = new LinkLabel<>(ExecutionBundle.message("run.configuration.before.run.add.task"), null, (aSource, aLinkData) -> showPopup()); myAddLabel.setBorder(border); - DnDManager.getInstance().registerTarget(this, this, parentDisposable); + DnDManager.getInstance().registerTarget(this, this, this); } private List>> getProviders() {