From 731fe6cd73563d458832215b88d8d2aaa147effe Mon Sep 17 00:00:00 2001 From: Deepika Udayagiri Date: Thu, 8 Feb 2024 18:53:32 +0530 Subject: [PATCH] Set the selection to 1st CTabItem when it is created. Fixes #46 --- .../common/org/eclipse/swt/custom/CTabFolder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java index d1acaab705..3978f2216b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java @@ -774,6 +774,7 @@ void createItem (CTabItem item, int index) { priority = newPriority; if (items.length == 1) { + setSelection(0); updateFolder(UPDATE_TAB_HEIGHT | REDRAW); } else { updateFolder(REDRAW_TABS);