Changeset 17370 in josm


Ignore:
Timestamp:
2020-11-28T08:38:34+01:00 (4 years ago)
Author:
GerdP
Message:

fix #20165: Changset manager: Discussion tab: Problem with sorting by date

  • implement special sorter for date

Cannot use automatically created row sorter because it uses Object.toString() for sorting and the format returned by Date.toString() (e.g. "Sat May 30 08:54:31 CEST 2020") is not usable for sorting.

Location:
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionPanel.java

    r16121 r17370  
    117117        JPanel pnl = new JPanel(new BorderLayout());
    118118        table = new JTable(model, new ChangesetDiscussionTableColumnModel());
    119         table.setAutoCreateRowSorter(true);
     119        table.setRowSorter(new ChangesetDiscussionTableRowSorter(model));
     120
    120121        table.getColumnModel().getColumn(2).addPropertyChangeListener(evt -> {
    121122            if ("width".equals(evt.getPropertyName())) {
Note: See TracChangeset for help on using the changeset viewer.