Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2023 BSI Business Systems Integration AG
* Copyright (c) 2010, 2026 BSI Business Systems Integration AG
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -35,9 +35,6 @@ public void setColumnIndexInternal(int index) {
if (currentColIndex < 0) {
doSetColumnIndex(index);
}
else {
LOG.warn(null, new IllegalAccessException("do not use this internal method"));
}
}

protected void doSetColumnIndex(int index) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,11 @@ public boolean isEmpty() {
}

public void setColumnIndexInternal(int index) {
int currentColIndex = getColumnIndex();
if (currentColIndex >= 0) {
LOG.warn("Unexpected column index {} for column {}", currentColIndex, this, new Exception("Stacktrace"));
return;
}
m_headerCell.setColumnIndexInternal(index);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2025 BSI Business Systems Integration AG
* Copyright (c) 2010, 2026 BSI Business Systems Integration AG
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -1111,6 +1111,9 @@ public void applyConfig(String configName) {
m_organizedTable.getReloadHandler().reload(IReloadReason.ORGANIZE_COLUMNS);
}
getColumnsTableField().reloadTableData();
// After reloading, the columnsTableField now contains the expected columns in the correct order
// -> ensure the order of columns is correctly applied to the table
updateColumnVisibilityAndOrder();
}

protected void applyConfigImpl(String configName) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2024 BSI Business Systems Integration AG
* Copyright (c) 2010, 2026 BSI Business Systems Integration AG
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -264,10 +264,17 @@ protected void execStore() {
newCols.add(col);
col.setVisible(true);
}
if (m_insertAfterColumn == null || newCols.isEmpty()) {
if (newCols.isEmpty()) {
return;
}
ColumnSet colSet = newCols.get(0).getTable().getColumnSet();

ITable table = newCols.getFirst().getTable();
if (m_insertAfterColumn == null) {
ClientUIPreferences.getInstance().setAllTableColumnPreferences(table);
return;
}

ColumnSet colSet = table.getColumnSet();
List<IColumn<?>> newOrder = new ArrayList<>();
List<IColumn<?>> visibleColumns = colSet.getVisibleColumns();
int position = 0;
Expand Down Expand Up @@ -305,7 +312,7 @@ else if (newPosFirst != -1 && posInsertAfter == -1) {
i++;
}
colSet.setVisibleColumns(newOrder);
ClientUIPreferences.getInstance().setAllTableColumnPreferences(newCols.get(0).getTable());
ClientUIPreferences.getInstance().setAllTableColumnPreferences(table);
}

@Override
Expand Down