From 55da9fa0594f4cfee9431a75bce3ed5509fb0e53 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Thu, 2 Jun 2022 10:35:14 +0200 Subject: [PATCH] Change opening order in TabbedArea --- .../src/org/argeo/app/ui/widgets/TabbedArea.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/org.argeo.app.ui/src/org/argeo/app/ui/widgets/TabbedArea.java b/org.argeo.app.ui/src/org/argeo/app/ui/widgets/TabbedArea.java index c214207..321a198 100644 --- a/org.argeo.app.ui/src/org/argeo/app/ui/widgets/TabbedArea.java +++ b/org.argeo.app.ui/src/org/argeo/app/ui/widgets/TabbedArea.java @@ -153,9 +153,10 @@ public class TabbedArea extends Composite { Section previousSection = new Section(body, SWT.NONE, context); build(previousSection, previousUiProvider, previousNode); // previousSection.setLayoutData(CmsUiUtils.coverAll()); - int index = currentIndex + 1; - sections.add(index, previousSection); - showTab(index); + int newIndex = currentIndex + 1; + sections.add(currentIndex, previousSection); +// sections.add(newIndex, previousSection); + showTab(newIndex); refreshTabHeaders(); layout(true, true); } @@ -200,10 +201,10 @@ public class TabbedArea extends Composite { refreshTabHeaders(); showTab(nextIndex); } - + public void closeAllTabs() { - for(Section section:sections) { - section.dispose(); + for (Section section : sections) { + section.dispose(); } sections.clear(); emptyState(); -- 2.30.2