Changeset 34201 in osm for applications/editors/josm/plugins/pdfimport/src
- Timestamp:
- 2018-05-18T19:25:09+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/pdfimport/src/pdfimport
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java
r34189 r34201 50 50 import org.openstreetmap.josm.data.osm.Node; 51 51 import org.openstreetmap.josm.data.osm.OsmPrimitive; 52 import org.openstreetmap.josm.data.osm.UploadPolicy; 52 53 import org.openstreetmap.josm.gui.MainApplication; 53 54 import org.openstreetmap.josm.gui.SideButton; … … 570 571 data = loadPDF(newFileName, monitor.createSubTaskMonitor(500, false)); 571 572 OsmBuilder.Mode mode = LoadPdfDialog.this.debugModeCheck.isSelected() ? OsmBuilder.Mode.Debug : OsmBuilder.Mode.Draft; 573 // OsmBuilder.Mode mode = Logging.isDebugEnabled() ? OsmBuilder.Mode.Debug : OsmBuilder.Mode.Draft; 572 574 573 575 if (data != null) { 574 576 LoadPdfDialog.this.newLayer = LoadPdfDialog.this.makeLayer( 575 tr("PDF filepreview"), new FilePlacement(), mode, monitor.createSubTaskMonitor(500, false));577 tr("PDF preview: ") + newFileName.getName(), new FilePlacement(), mode, monitor.createSubTaskMonitor(500, false)); 576 578 } 577 579 … … 632 634 SwingRenderingProgressMonitor monitor = new SwingRenderingProgressMonitor(progressRenderer); 633 635 LoadPdfDialog.this.newLayer = LoadPdfDialog.this.makeLayer( 634 tr(" ImportedPDF: ") + pdfFile, placement, OsmBuilder.Mode.Final, monitor);636 tr("PDF: ") + pdfFile.getName(), placement, OsmBuilder.Mode.Final, monitor); 635 637 progressRenderer.finish(); 636 638 } … … 738 740 //get PDF file to load 739 741 if (loadChooser == null) { 740 loadChooser = new JFileChooser(Config.getPref().get("p lugins.pdfimport.loadDir"));742 loadChooser = new JFileChooser(Config.getPref().get("pdfimport.loadDir")); 741 743 loadChooser.setAcceptAllFileFilterUsed(false); 742 744 loadChooser.setMultiSelectionEnabled(false); … … 1056 1058 monitor.setCustomText(tr("Postprocessing layer")); 1057 1059 OsmDataLayer result = new OsmDataLayer(data, name, null); 1060 data.setUploadPolicy(UploadPolicy.BLOCKED); 1061 result.setUploadDiscouraged(true); 1062 result.setBackgroundLayer(true); 1058 1063 result.onPostLoadFromFile(); 1059 1064 -
applications/editors/josm/plugins/pdfimport/src/pdfimport/PdfImportPlugin.java
r33569 r34201 1 1 // License: GPL. For details, see LICENSE file. 2 2 package pdfimport; 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 3 6 4 import org.openstreetmap.josm.gui.MainApplication; … … 14 12 public class PdfImportPlugin extends Plugin { 15 13 16 protected String name;17 18 14 public PdfImportPlugin(PluginInformation info) { 19 15 super(info); 20 name = tr("Import PDF file");21 16 MainMenu.add(MainApplication.getMenu().imagerySubMenu, new PdfImportAction()); 22 17 }
Note:
See TracChangeset
for help on using the changeset viewer.