Ticket #969: bbnorefresh.diff
| File bbnorefresh.diff, 1.7 KB (added by , 18 years ago) |
|---|
-
src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
40 40 new JTextField(11), 41 41 new JTextField(11) }; 42 42 final JTextArea osmUrl = new JTextArea(); 43 String oldUrl = new String(""); 43 44 44 45 final JLabel sizeCheck = new JLabel(); 45 46 … … 81 82 public void insertUpdate(DocumentEvent e) { dowork(); } 82 83 public void removeUpdate(DocumentEvent e) { dowork(); } 83 84 private void dowork() { 84 Bounds b = osmurl2bounds(osmUrl.getText()); 85 if (b != null) { 86 gui.minlon = b.min.lon(); 87 gui.minlat = b.min.lat(); 88 gui.maxlon = b.max.lon(); 89 gui.maxlat = b.max.lat(); 90 gui.boundingBoxChanged(BoundingBoxSelection.this); 91 updateBboxFields(gui); 92 updateSizeCheck(gui); 85 if(!oldUrl.equals(osmUrl.getText())) 86 { 87 Bounds b = osmurl2bounds(osmUrl.getText()); 88 if (b != null) { 89 gui.minlon = b.min.lon(); 90 gui.minlat = b.min.lat(); 91 gui.maxlon = b.max.lon(); 92 gui.maxlat = b.max.lat(); 93 gui.boundingBoxChanged(BoundingBoxSelection.this); 94 updateBboxFields(gui); 95 updateSizeCheck(gui); 96 } 93 97 } 94 98 } 95 99 }; … … 162 166 size *= 2; 163 167 zoom++; 164 168 } 165 osmUrl.setText("http://www.openstreetmap.org/index.html?mlat="+lat+"&mlon="+lon+"&zoom="+zoom); 169 // setting old URL prevents refresh based on this URL 170 oldUrl = "http://www.openstreetmap.org/index.html?mlat="+lat+"&mlon="+lon+"&zoom="+zoom; 171 osmUrl.setText(oldUrl); 166 172 } 167 173 168 174 private void updateSizeCheck(DownloadDialog gui) {
