Changeset 16106 in josm
- Timestamp:
- 2020-03-10T00:04:08+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
r15586 r16106 42 42 43 43 import javax.imageio.ImageIO; 44 import javax.swing.ListSelectionModel; 44 45 import javax.xml.namespace.QName; 45 46 import javax.xml.stream.XMLStreamException; … … 328 329 } 329 330 331 @Override 332 public void setupDialog() { 333 super.setupDialog(); 334 buttons.get(0).setEnabled(false); 335 ListSelectionModel selectionModel = list.getTable().getSelectionModel(); 336 selectionModel.addListSelectionListener(e -> buttons.get(0).setEnabled(!selectionModel.isSelectionEmpty())); 337 } 338 330 339 public DefaultLayer getSelectedLayer() { 331 340 Layer selectedLayer = list.getSelectedLayer(); 332 return new DefaultLayer(ImageryType.WMTS, selectedLayer.identifier, selectedLayer.style, selectedLayer.tileMatrixSet.identifier);333 }334 341 return selectedLayer == null ? null : 342 new DefaultLayer(ImageryType.WMTS, selectedLayer.identifier, selectedLayer.style, selectedLayer.tileMatrixSet.identifier); 343 } 335 344 } 336 345
Note:
See TracChangeset
for help on using the changeset viewer.