Changeset 24907 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
- Timestamp:
- 2010-12-29T23:18:37+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
r23190 r24907 96 96 public boolean loadCacheIfExist() { 97 97 try { 98 if (!wmsLayer.isBuildingsOnly()) { 99 File file = new File(CadastrePlugin.cacheDir + wmsLayer.getName() + "." + WMSFileExtension()); 100 if (file.exists()) { 101 JOptionPane pane = new JOptionPane( 102 tr("Location \"{0}\" found in cache.\n"+ 103 "Load cache first ?\n"+ 104 "(No = new cache)", wmsLayer.getName()), 105 JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, null); 106 // this below is a temporary workaround to fix the "always on top" issue 107 JDialog dialog = pane.createDialog(Main.parent, tr("Select Feuille")); 108 CadastrePlugin.prepareDialog(dialog); 109 dialog.setVisible(true); 110 int reply = (Integer)pane.getValue(); 111 // till here 112 113 if (reply == JOptionPane.OK_OPTION && loadCache(file, wmsLayer.getLambertZone())) { 114 return true; 115 } else { 116 delete(file); 117 } 118 } 119 } else { 120 int i=0; 121 while (new File(CadastrePlugin.cacheDir + wmsLayer.getName() + "."+i+"."+ WMSFileExtension()).exists()) 122 i++; 123 wmsLayer.setName(wmsLayer.getName()+"."+i); 98 File file = new File(CadastrePlugin.cacheDir + wmsLayer.getName() + "." + WMSFileExtension()); 99 if (file.exists()) { 100 JOptionPane pane = new JOptionPane( 101 tr("Location \"{0}\" found in cache.\n"+ 102 "Load cache first ?\n"+ 103 "(No = new cache)", wmsLayer.getName()), 104 JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, null); 105 // this below is a temporary workaround to fix the "always on top" issue 106 JDialog dialog = pane.createDialog(Main.parent, tr("Select Feuille")); 107 CadastrePlugin.prepareDialog(dialog); 108 dialog.setVisible(true); 109 int reply = (Integer)pane.getValue(); 110 // till here 111 112 if (reply == JOptionPane.OK_OPTION && loadCache(file, wmsLayer.getLambertZone())) { 113 return true; 114 } else { 115 delete(file); 116 } 124 117 } 125 118 } catch (Exception e) {
Note:
See TracChangeset
for help on using the changeset viewer.