Changeset 13429 in josm for trunk/src/org


Ignore:
Timestamp:
2018-02-17T15:16:02+01:00 (7 years ago)
Author:
Don-vip
Message:

see #15940 - allow to sort WMTS entries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java

    r13388 r13429  
    257257                    });
    258258            this.list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     259            this.list.setAutoCreateRowSorter(true);
    259260            this.list.setRowSelectionAllowed(true);
    260261            this.list.setColumnSelectionAllowed(false);
     
    269270                return null; //nothing selected
    270271            }
    271             Layer selectedLayer = layers.get(index).getValue().get(0);
     272            Layer selectedLayer = layers.get(list.convertRowIndexToModel(index)).getValue().get(0);
    272273            return new WMTSDefaultLayer(selectedLayer.identifier, selectedLayer.tileMatrixSet.identifier);
    273274        }
Note: See TracChangeset for help on using the changeset viewer.