Changeset 34435 in osm for applications/editors/josm/plugins/pdfimport/src
- Timestamp:
- 2018-07-27T11:54:47+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/pdfimport/src/pdfimport
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java
r34425 r34435 281 281 282 282 private PathOptimizer pdfData; 283 private OsmDataLayer dataLayer; 283 // private OsmDataLayer dataLayer; 284 284 285 285 private final JButton loadFileButton = new JButton(tr("Load preview ...")); … … 713 713 */ 714 714 removeLayer(); 715 dataLayer = _layer; 716 MainApplication.getLayerManager().addLayer(dataLayer); 715 Preview.set(_layer, placement); 716 // dataLayer = _layer; 717 // MainApplication.getLayerManager().addLayer(dataLayer); 717 718 MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(pdfData)); 718 719 } … … 722 723 * remove preview layer 723 724 */ 724 if (dataLayer != null) { 725 MainApplication.getLayerManager().removeLayer(dataLayer); 726 dataLayer.data.clear(); // saves memory 727 dataLayer = null; 728 } 725 // if (dataLayer != null) { 726 // MainApplication.getLayerManager().removeLayer(dataLayer); 727 // dataLayer.data.clear(); // saves memory 728 // dataLayer = null; 729 // } 730 Preview.clear(); 729 731 // No layer ==> no actions 730 732 actionPanel.showButton.setEnabled(false); -
applications/editors/josm/plugins/pdfimport/src/pdfimport/ProjectionInfo.java
r34398 r34435 26 26 } 27 27 28 public static Projection getProjectionByCode(String code) { 29 return new SingleProjectionChoice(code.toString(), code.toString(), code).getProjection() ; 28 public static Projection getProjectionByCode(String code) { 29 try { 30 ProjectionChoice pc = new SingleProjectionChoice(code.toString(), code.toString(), code); 31 Projection p = pc.getProjection(); 32 return p; 33 } catch (Exception e) { 34 throw new IllegalArgumentException(); 35 } 30 36 31 37 // Projection p = allCodes.get(code);
Note:
See TracChangeset
for help on using the changeset viewer.