[tabs] IDEA-300571 Update tab toolbars only when tabs are not hidden and there are some tabs

GitOrigin-RevId: acae17af08afcd4eb114626ec256b51d7bb8544a
This commit is contained in:
Konstantin Hudyakov
2024-03-27 17:14:54 +00:00
committed by intellij-monorepo-bot
parent 3fd4de3809
commit 761e92518c
@@ -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)
}