changeset 7828:0549284f26c9

RT-38456: [TabPane] Tabs can be incorrectly made invisible when rearranged
author jgiles
date Thu, 28 Aug 2014 09:56:55 +1200
parents 20ee873c49f1
children 5e4ce148e333
files modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TabPaneSkin.java
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TabPaneSkin.java	Wed Aug 27 15:24:38 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TabPaneSkin.java	Thu Aug 28 09:56:55 2014 +1200
@@ -273,7 +273,7 @@
                 tabHeaderArea.setVisible(true);
             }
             int index = from + i++;
-            tabHeaderArea.addTab(tab, index, false);
+            tabHeaderArea.addTab(tab, index);
             addTabContent(tab);
             final TabHeaderSkin tabRegion = tabHeaderArea.getTabHeaderSkin(tab);
             if (tabRegion != null) {
@@ -768,7 +768,7 @@
 
             int i = 0;
             for (Tab tab: tabPane.getTabs()) {
-                addTab(tab, i++, true);
+                addTab(tab, i++);
             }
 
             controlButtons = new TabControlButtons();
@@ -848,9 +848,8 @@
             headerClip.setHeight(clipHeight);
         }
 
-        private void addTab(Tab tab, int addToIndex, boolean visible) {
+        private void addTab(Tab tab, int addToIndex) {
             TabHeaderSkin tabHeaderSkin = new TabHeaderSkin(tab);
-            tabHeaderSkin.setVisible(visible);
             headersRegion.getChildren().add(addToIndex, tabHeaderSkin);
         }