Changeset 4531 in josm for trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
- Timestamp:
- 2011-10-20T14:12:47+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r4172 r4531 5 5 6 6 import java.awt.event.ActionEvent; 7 8 import javax.swing.JOptionPane; 7 9 8 10 import org.openstreetmap.josm.Main; … … 25 27 public void actionPerformed(ActionEvent e) { 26 28 if (!isEnabled()) return; 27 Main.main.addLayer(ImageryLayer.create(info)); 29 try { 30 Main.main.addLayer(ImageryLayer.create(info)); 31 } catch (IllegalArgumentException ex) { 32 if (ex.getMessage() == null || ex.getMessage().isEmpty()) { 33 throw ex; 34 } else { 35 JOptionPane.showMessageDialog(Main.parent, 36 ex.getMessage(), tr("Error"), 37 JOptionPane.ERROR_MESSAGE); 38 } 39 } 28 40 } 29 41
Note:
See TracChangeset
for help on using the changeset viewer.
