Merge pull request #2578 from stoopipoopy/unstable

[#2576] Fix Sorting Problem With Sides and Line Count columns on Parachute Preset Library
This commit is contained in:
Joe Pfeiffer 2024-10-17 09:54:25 -06:00 committed by GitHub
commit 3499ba4dd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,6 @@ public class ComponentPresetTable extends JTable {
this.favorites = Application.getPreferences().getComponentFavorites(presetType);
this.columns = new ComponentPresetTableColumn[ComponentPreset.ORDERED_KEY_LIST.size() + 1];
this.tableModel = new AbstractTableModel() {
final ComponentPresetTableColumn[] myColumns = columns;
@ -135,6 +134,13 @@ public class ComponentPresetTable extends JTable {
}
});
} else if (key.getType() == Integer.class){
sorter.setComparator(index, new Comparator<Integer>() {
@Override
public int compare(Integer o1, Integer o2) {
return Integer.compare(o1.intValue(), o2.intValue());
}
});
} else if (key.getType() == Boolean.class) {
sorter.setComparator(index, new Comparator<Boolean>() {