Changeset 29101 in osm for applications
- Timestamp:
- 2012-12-21T00:37:53+01:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
r28887 r29101 93 93 94 94 public boolean loadCacheIfExist() { 95 if (!CadastrePlugin.isCadastreProjection()) { 96 CadastrePlugin.askToChangeProjection(); 97 } 95 98 try { 96 99 File file = new File(CadastrePlugin.cacheDir + wmsLayer.getName() + "." + WMSFileExtension()); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
r28887 r29101 30 30 import org.openstreetmap.josm.gui.IconToggleButton; 31 31 import org.openstreetmap.josm.gui.layer.Layer; 32 import org.openstreetmap.josm.gui.preferences.PreferenceDialog; 32 33 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 34 import org.openstreetmap.josm.gui.preferences.map.MapPreference; 33 35 import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference; 34 36 import org.openstreetmap.josm.plugins.Plugin; … … 479 481 } 480 482 483 public static void askToChangeProjection() { 484 if (JOptionPane.showConfirmDialog(Main.parent, 485 tr("To enable the cadastre WMS plugin, change\n" 486 + "the current projection to one of the cadastre\n" 487 + "projections and retry"), 488 tr("Change the current projection"), JOptionPane.OK_CANCEL_OPTION) 489 == JOptionPane.OK_OPTION) { 490 PreferenceDialog p = new PreferenceDialog(Main.parent); 491 p.selectPreferencesTabByClass(MapPreference.class); 492 p.getTabbedPane().getSetting(ProjectionPreference.class).selectProjection(ProjectionPreference.lambert_cc9); 493 p.setVisible(true); 494 } 495 } 481 496 } -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSVectorImage.java
r26823 r29101 37 37 if (wmsLayer.grabThread.getCacheControl().loadCacheIfExist()) { 38 38 Main.map.mapView.zoomTo(wmsLayer.getFirstViewFromCacheBBox().toBounds()); 39 //Main.map.mapView.repaint();40 39 return; 41 40 } -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrab.java
r27906 r29101 36 36 DownloadWMSVectorImage.download(wmsLayer); 37 37 } else { 38 JOptionPane.showMessageDialog(Main.parent, 39 tr("To enable the cadastre WMS plugin, change\n" 40 + "the current projection to one of the cadastre\n" 41 + "projections and retry")); 38 CadastrePlugin.askToChangeProjection(); 42 39 } 43 40 } else -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java
r27906 r29101 94 94 Main.worker.execute(this); 95 95 } else { 96 JOptionPane.showMessageDialog(Main.parent, 97 tr("To enable the cadastre WMS plugin, change\n" 98 + "the current projection to one of the cadastre\n" 99 + "projections and retry")); 96 CadastrePlugin.askToChangeProjection(); 100 97 } 101 98 }
Note:
See TracChangeset
for help on using the changeset viewer.