X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.app.ui%2Fsrc%2Forg%2Fargeo%2Fapp%2Fui%2Fwidgets%2FTabbedArea.java;fp=org.argeo.app.ui%2Fsrc%2Forg%2Fargeo%2Fapp%2Fui%2Fwidgets%2FTabbedArea.java;h=321a1987f120cd08b368d98da85f90b63b3c6abc;hb=55da9fa0594f4cfee9431a75bce3ed5509fb0e53;hp=c214207d3c4c9873d0a517d2f9bf920da802fc9c;hpb=beb5e6f076b22822c9a94839dccca1c28922f19b;p=gpl%2Fargeo-suite.git 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();