diff --git a/platform/lang-impl/src/com/intellij/execution/dashboard/RunDashboardContent.java b/platform/lang-impl/src/com/intellij/execution/dashboard/RunDashboardContent.java index 1cdba9fb2f01..a3c7d0781fb2 100644 --- a/platform/lang-impl/src/com/intellij/execution/dashboard/RunDashboardContent.java +++ b/platform/lang-impl/src/com/intellij/execution/dashboard/RunDashboardContent.java @@ -146,7 +146,7 @@ public class RunDashboardContent extends JPanel implements TreeContent, Disposab } RunnerLayoutUiImpl layoutUiImpl = (RunnerLayoutUiImpl)layoutUi; layoutUiImpl.setLeftToolbarVisible(false); - layoutUiImpl.setContentToolbarBefore(false); + layoutUiImpl.setContentToolbarBefore(!RunDashboardManager.getInstance(myProject).isShowConfigurations()); List leftToolbarActions = layoutUiImpl.getActions(); myContentActions.put(content, leftToolbarActions); updateContentToolbar(content); @@ -397,6 +397,18 @@ public class RunDashboardContent extends JPanel implements TreeContent, Disposab public void updateContent(boolean withStructure) { AppUIUtil.invokeLaterIfProjectAlive(myProject, () -> { boolean showConfigurations = RunDashboardManager.getInstance(myProject).isShowConfigurations(); + + Content selectedContent = myContentManager.getSelectedContent(); + if (selectedContent != null) { + RunContentDescriptor descriptor = RunContentManagerImpl.getRunContentDescriptorByContent(selectedContent); + if (descriptor != null) { + RunnerLayoutUi layoutUi = descriptor.getRunnerLayoutUi(); + if (layoutUi instanceof RunnerLayoutUiImpl) { + ((RunnerLayoutUiImpl)layoutUi).setContentToolbarBefore(!showConfigurations); + } + } + } + if (myTreePanel.isVisible() ^ showConfigurations) { setTreeVisible(showConfigurations);