From: Mathieu Baudier Date: Thu, 2 Jun 2022 08:35:14 +0000 (+0200) Subject: Change opening order in TabbedArea X-Git-Tag: v2.3.8~99 X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=commitdiff_plain;h=55da9fa0594f4cfee9431a75bce3ed5509fb0e53 Change opening order in TabbedArea --- 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();