From e1f7ccec59ebfc9843269ad2a960bacdcfd133e4 Mon Sep 17 00:00:00 2001 From: wsbrenk Date: Tue, 22 Oct 2024 23:18:13 +0200 Subject: [PATCH] Fix storeUserSettings --- src/main/java/core/gui/comp/table/HOTableModel.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/core/gui/comp/table/HOTableModel.java b/src/main/java/core/gui/comp/table/HOTableModel.java index 3db1c4a01..f7741eb4a 100644 --- a/src/main/java/core/gui/comp/table/HOTableModel.java +++ b/src/main/java/core/gui/comp/table/HOTableModel.java @@ -348,8 +348,11 @@ private boolean setUserColumnSettings(JTable table, int offset) { private boolean setUserColumnSettings(JTable table) { if(table instanceof FixedColumnsTable fixedColumnstable) { - return setUserColumnSettings(fixedColumnstable.getFixedTable(), 0) || - setUserColumnSettings(fixedColumnstable, fixedColumnstable.getColumnCount()); + var changed = setUserColumnSettings(fixedColumnstable.getFixedTable(), 0); + if (setUserColumnSettings(fixedColumnstable, fixedColumnstable.getFixedColumnsCount()) ){ + changed = true; + } + return changed; } return setUserColumnSettings(table,0); } @@ -416,7 +419,9 @@ public void storeUserSettings(){ RowSorter sorter = (RowSorter) table.getRowSorter(); if (sorter != null){ - changed = changed || setRowOrderSettings(sorter); + if ( setRowOrderSettings(sorter) ) { + changed = true; + } } if (changed){ DBManager.instance().saveHOColumnModel(this);