Ticket #1905: Allow Reloading Error Tiles.patch
| File Allow Reloading Error Tiles.patch, 2.2 KB (added by , 17 years ago) |
|---|
-
src/wmsplugin/GeorefImage.java
26 26 private Dimension reImgHash = new Dimension(0, 0); 27 27 public EastNorth min, max; 28 28 public boolean downloadingStarted; 29 public boolean failed = false; 29 30 30 31 public GeorefImage(boolean downloadingStarted) { 31 32 this.downloadingStarted = downloadingStarted; -
src/wmsplugin/Grabber.java
52 52 g.setColor(Color.BLACK); 53 53 g.drawString(tr("Exception occurred"), 10, height()/2); 54 54 image.image = img; 55 image.failed = true; 55 56 g.setFont(font); 56 57 } 57 58 -
src/wmsplugin/WMSLayer.java
203 203 startstop, 204 204 alphaChannel, 205 205 new JMenuItem(new changeResolutionAction()), 206 new JMenuItem(new reloadErrorTilesAction()), 206 207 new JMenuItem(new downloadAction()), 207 208 new JSeparator(), 208 209 new JMenuItem(new LayerListPopup.InfoAction(this)) … … 239 240 } 240 241 } 241 242 243 public class reloadErrorTilesAction extends AbstractAction { 244 public reloadErrorTilesAction() { 245 super(tr("Reload erroneous tiles")); 246 } 247 public void actionPerformed(ActionEvent ev) { 248 for (int x = 0; x < dax; ++x) { 249 for (int y = 0; y < day; ++y) { 250 GeorefImage img = images[modulo(x,dax)][modulo(y,day)]; 251 img.image = null; 252 img.downloadingStarted = false; 253 img.failed = false; 254 mv.repaint(); 255 } 256 } 257 } 258 } 259 242 260 public class ToggleAlphaAction extends AbstractAction { 243 261 public ToggleAlphaAction() { 244 262 super(tr("Alpha channel"));
