Changeset 2649 in josm for trunk/src/org
- Timestamp:
- 2009-12-17T19:02:35+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r2646 r2649 104 104 } 105 105 106 Vector gpxLst = new Vector();106 Vector<GpxDataWrapper> gpxLst = new Vector<GpxDataWrapper>(); 107 107 JPanel panel = null; 108 108 JComboBox cbGpx = null; … … 145 145 146 146 for (int i = gpxLst.size() - 1 ; i >= 0 ; i--) { 147 if (gpxLst.get(i) instanceof GpxDataWrapper) { 148 GpxDataWrapper wrapper = (GpxDataWrapper) gpxLst.get(i); 149 if (sel.equals(wrapper.file)) { 150 cbGpx.setSelectedIndex(i); 151 if (!sel.getName().equals(wrapper.name)) { 152 JOptionPane.showMessageDialog( 153 Main.parent, 154 tr("File {0} is loaded yet under the name \"{1}\"", sel.getName(), wrapper.name), 155 tr("Error"), 156 JOptionPane.ERROR_MESSAGE 157 ); 158 } 159 return; 147 GpxDataWrapper wrapper = gpxLst.get(i); 148 if (wrapper.file != null && sel.equals(wrapper.file)) { 149 cbGpx.setSelectedIndex(i); 150 if (!sel.getName().equals(wrapper.name)) { 151 JOptionPane.showMessageDialog( 152 Main.parent, 153 tr("File {0} is loaded yet under the name \"{1}\"", sel.getName(), wrapper.name), 154 tr("Error"), 155 JOptionPane.ERROR_MESSAGE 156 ); 160 157 } 158 return; 161 159 } 162 160 } … … 193 191 194 192 loadedGpxData.add(data); 195 if (gpxLst.get(0) instanceof String) {193 if (gpxLst.get(0).file == null) { 196 194 gpxLst.remove(0); 197 195 } … … 279 277 panelTf.add(new JLabel(tr("I'm in the timezone of: ")), gc); 280 278 281 Vector vtTimezones = new Vector<String>();279 Vector<String> vtTimezones = new Vector<String>(); 282 280 String[] tmp = TimeZone.getAvailableIDs(); 283 281 … … 441 439 gpxLst.add(gdw); 442 440 if (cur == yLayer.gpxLayer) { 443 System.err.println("Hier!");444 441 defaultItem = gdw; 445 442 } … … 453 450 454 451 if (gpxLst.size() == 0) { 455 gpxLst.add( tr("<No GPX track loaded yet>"));452 gpxLst.add(new GpxDataWrapper(tr("<No GPX track loaded yet>"), null, null)); 456 453 } 457 454
Note:
See TracChangeset
for help on using the changeset viewer.