Changeset 34438 in osm for applications/editors/josm/plugins/pdfimport
- Timestamp:
- 2018-08-01T11:32:45+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java
r34435 r34438 407 407 LoadPdfDialog.this.pdfFile = newFileName; 408 408 if (pdfData != null) { 409 LoadPdfDialog.this.placeLayer(newLayer, new FilePlacement()); 409 Preview.set(newLayer, new FilePlacement()); 410 MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(pdfData)); 410 411 try { 411 412 LoadPdfDialog.this.placement.load(newFileName); 412 413 } catch (IOException e) { 413 // Dont care414 // Saved placement does not exist, corrupt, ... ---> ignore it 414 415 } finally { 415 416 LoadPdfDialog.this.placement.verify(); … … 455 456 // sync part 456 457 // rebuild layer with latest projection 457 LoadPdfDialog.this.placeLayer(newLayer, placement); 458 MainApplication.getLayerManager().addLayer(newLayer); 459 MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(pdfData)); 458 460 LoadPdfDialog.this.setVisible(false); 459 461 } … … 708 710 } 709 711 710 private void placeLayer(OsmDataLayer _layer, FilePlacement placement) { 711 /* 712 * 713 */ 714 removeLayer(); 715 Preview.set(_layer, placement); 716 // dataLayer = _layer; 717 // MainApplication.getLayerManager().addLayer(dataLayer); 718 MainApplication.getMap().mapView.zoomTo(placement.getWorldBounds(pdfData)); 719 } 720 721 private void removeLayer() { 712 private void removeLayer() { 722 713 /* 723 714 * remove preview layer
Note:
See TracChangeset
for help on using the changeset viewer.