Skip to content

Commit

Permalink
Fix storeUserSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
wsbrenk committed Oct 22, 2024
1 parent 2c96673 commit e1f7cce
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/main/java/core/gui/comp/table/HOTableModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -416,7 +419,9 @@ public void storeUserSettings(){

RowSorter<HOTableModel> sorter = (RowSorter<HOTableModel>) table.getRowSorter();
if (sorter != null){
changed = changed || setRowOrderSettings(sorter);
if ( setRowOrderSettings(sorter) ) {
changed = true;
}
}
if (changed){
DBManager.instance().saveHOColumnModel(this);
Expand Down

0 comments on commit e1f7cce

Please sign in to comment.