From 761e92518c4d7658250ea0301f6089ee036cd5d9 Mon Sep 17 00:00:00 2001 From: Konstantin Hudyakov Date: Wed, 27 Mar 2024 12:21:28 +0200 Subject: [PATCH] [tabs] IDEA-300571 Update tab toolbars only when tabs are not hidden and there are some tabs GitOrigin-RevId: acae17af08afcd4eb114626ec256b51d7bb8544a --- .../src/com/intellij/ui/tabs/impl/JBTabsImpl.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/platform-api/src/com/intellij/ui/tabs/impl/JBTabsImpl.kt b/platform/platform-api/src/com/intellij/ui/tabs/impl/JBTabsImpl.kt index 037e8d121756..856acd5a14f4 100644 --- a/platform/platform-api/src/com/intellij/ui/tabs/impl/JBTabsImpl.kt +++ b/platform/platform-api/src/com/intellij/ui/tabs/impl/JBTabsImpl.kt @@ -2508,7 +2508,10 @@ open class JBTabsImpl( forcedRelayout = forced } if (moreToolbar != null) { - moreToolbar.component.isVisible = !isHideTabs && effectiveLayout!!.isScrollable + moreToolbar.component.isVisible = !isHideTabs && visibleInfos.isNotEmpty() && effectiveLayout!!.isScrollable + } + if (entryPointToolbar != null) { + entryPointToolbar!!.component.isVisible = !isHideTabs && visibleInfos.isNotEmpty() } revalidateAndRepaint(layoutNow) } @@ -2593,9 +2596,6 @@ open class JBTabsImpl( } this.hideTabs = hideTabs - if (entryPointToolbar != null) { - entryPointToolbar!!.component.isVisible = !this.hideTabs - } relayout(forced = true, layoutNow = false) }