From 58d1b83ea3c3486a85fc068d4e6b4228f244e5ff Mon Sep 17 00:00:00 2001 From: Sergei Tachenov Date: Thu, 19 Sep 2024 17:56:16 +0300 Subject: [PATCH] IJPL-161357, IJPL-162474 Set JBTabsImpl tab position in init This takes care of the divider visibility regardless of when and how the tabs are created, fixing both mentioned issues. GitOrigin-RevId: 9907327b4c817db4f134d3f2cdd8a3f8a3163287 --- .../platform-api/src/com/intellij/ui/tabs/impl/JBTabsImpl.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 946242f2a636..ba269f819bf3 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 @@ -516,6 +516,7 @@ open class JBTabsImpl internal constructor( } }.addTo(this) scrollBarChangeListener = ChangeListener { updateTabsOffsetFromScrollBar() } + setTabsPosition(tabsPosition) } @Internal @@ -1405,7 +1406,6 @@ open class JBTabsImpl internal constructor( assert(visibleInfos.isEmpty()) visibleInfos.addAll(tabs) - setTabsPosition(tabsPosition) // update the divider visibility resetTabsCache() }