- Timestamp:
- 2008-10-05T11:21:12+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
r999 r1015 41 41 new JTextField(11) }; 42 42 final JTextArea osmUrl = new JTextArea(); 43 final JLabel showUrl = new JLabel(); 43 44 String noteUrl = tr("You can paste an URL here to download the area."); 44 String oldUrl = "";45 45 46 46 final JLabel sizeCheck = new JLabel(); … … 84 84 public void removeUpdate(DocumentEvent e) { dowork(); } 85 85 private void dowork() { 86 if(!oldUrl.equals(osmUrl.getText())) 87 { 88 Bounds b = osmurl2bounds(osmUrl.getText()); 89 if (b != null) { 90 gui.minlon = b.min.lon(); 91 gui.minlat = b.min.lat(); 92 gui.maxlon = b.max.lon(); 93 gui.maxlat = b.max.lat(); 94 gui.boundingBoxChanged(BoundingBoxSelection.this); 95 updateBboxFields(gui); 96 updateSizeCheck(gui); 97 oldUrl = osmUrl.getText(); 98 } 86 Bounds b = osmurl2bounds(osmUrl.getText()); 87 if (b != null) { 88 gui.minlon = b.min.lon(); 89 gui.minlat = b.min.lat(); 90 gui.maxlon = b.max.lon(); 91 gui.maxlat = b.max.lat(); 92 gui.boundingBoxChanged(BoundingBoxSelection.this); 93 updateBboxFields(gui); 94 updateSizeCheck(gui); 99 95 } 100 96 } … … 132 128 dlg.add(new JLabel(tr("URL from www.openstreetmap.org")), GBC.eol().insets(10,20,5,0)); 133 129 dlg.add(osmUrl, GBC.eop().insets(10,0,5,0).fill()); 130 dlg.add(showUrl, GBC.eop().insets(10,0,5,20)); 134 131 dlg.add(sizeCheck, GBC.eop().insets(10,0,5,20)); 135 132 … … 169 166 zoom++; 170 167 } 171 // setting old URL prevents refresh based on this URL 172 oldUrl = noteUrl+"\n"+"http://www.openstreetmap.org/index.html?mlat="+lat+"&mlon="+lon+"&zoom="+zoom; 173 osmUrl.setText(oldUrl); 168 showUrl.setText("http://www.openstreetmap.org/index.html?mlat="+lat+"&mlon="+lon+"&zoom="+zoom); 174 169 } 175 170
Note:
See TracChangeset
for help on using the changeset viewer.