Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java	(revision 34109)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java	(revision 34189)
@@ -12,5 +12,4 @@
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
-import java.awt.GridLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -61,4 +60,5 @@
 import org.openstreetmap.josm.gui.progress.swing.SwingRenderingProgressMonitor;
 import org.openstreetmap.josm.gui.util.WindowGeometry;
+import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Logging;
@@ -115,5 +115,5 @@
     }
 
-    private File fileName;
+    private File pdfFile;
     private PathOptimizer data;
     private OsmDataLayer layer;
@@ -242,7 +242,12 @@
     }
 
+    JPanel projectionPanel = null;
+    JPanel okCancelPanel = null;
+
     private void buildGUI() {
         GridBagConstraints c = new GridBagConstraints();
         c.gridheight = 1; c.gridwidth = 1; c.weightx = 1; c.weighty = 1; c.fill = GridBagConstraints.BOTH;
+        c.insets = new java.awt.Insets(0,0,0,0);
+//        c.ipadx = 1; c.ipady = 1;
 
         this.projectionCombo = new JComboBox<>();
@@ -356,6 +361,7 @@
 
 
-        JPanel projectionPanel = new JPanel(new GridBagLayout());
+        projectionPanel = new JPanel(new GridBagLayout());
         projectionPanel.setBorder(BorderFactory.createTitledBorder(tr("Bind to coordinates")));
+//        projectionPanel.setVisible(false);
 
         JPanel projectionSubPanel = new JPanel();
@@ -365,4 +371,6 @@
         projectionSubPanel.add(this.projectionCombo);
         projectionSubPanel.add(this.projectionPreferencesButton);
+        this.projectionPreferencesButton.setEnabled(false); // ToDo: disabled do avoid bugs
+
         c.gridx = 0; c.gridy = 0; c.gridwidth = 3;
         projectionPanel.add(projectionSubPanel, c);
@@ -403,5 +411,6 @@
         projectionPanel.add(this.getMaxButton, c);
 
-        JPanel okCancelPanel = new JPanel(new GridLayout(1, 3));
+        okCancelPanel = new JPanel(new FlowLayout());
+//        okCancelPanel.setVisible(false);
         okCancelPanel.add(this.cancelButton);
         okCancelPanel.add(this.showButton);
@@ -412,5 +421,5 @@
         c.gridx = 0; c.gridy = 0; c.gridwidth = 1;
         panel.add(configPanel, c);
-        c.gridx = 0; c.gridy = 1; c.gridwidth = 1;
+        c.gridx = 0; c.gridy = 1; c.gridwidth = 1; c.fill = GridBagConstraints.HORIZONTAL;
         panel.add(loadFileButton, c);
         c.gridx = 0; c.gridy = 2; c.gridwidth = 1;
@@ -418,5 +427,5 @@
         c.gridx = 0; c.gridy = 3; c.gridwidth = 1;
         panel.add(okCancelPanel, c);
-        c.gridx = 0; c.gridy = 4; c.gridwidth = 1;
+        c.gridx = 0; c.gridy = 4; c.gridwidth = 1; c.anchor = GridBagConstraints.NORTH; c.fill = GridBagConstraints.HORIZONTAL;
         panel.add(this.loadProgress, c);
 
@@ -556,4 +565,5 @@
                     public void run() {
                         //async part
+                        LoadPdfDialog.this.loadProgress.setVisible(true);
                         SwingRenderingProgressMonitor monitor = new SwingRenderingProgressMonitor(progressRenderer);
                         monitor.beginTask("Loading file", 1000);
@@ -577,7 +587,7 @@
                         if (data != null) {
                             LoadPdfDialog.this.placeLayer(newLayer, new FilePlacement());
-                            fileName = newFileName;
+                            pdfFile = newFileName;
                             newLayer = null;
-                            LoadPdfDialog.this.loadFileButton.setText(tr("Loaded"));
+                            LoadPdfDialog.this.loadFileButton.setText(tr("Loaded") + ": " + LoadPdfDialog.this.pdfFile.getName());
                             LoadPdfDialog.this.loadFileButton.setEnabled(true);
                             FilePlacement placement = LoadPdfDialog.this.loadPlacement();
@@ -619,7 +629,8 @@
                     public void run() {
                         //async part
+                        LoadPdfDialog.this.loadProgress.setVisible(true);
                         SwingRenderingProgressMonitor monitor = new SwingRenderingProgressMonitor(progressRenderer);
                         LoadPdfDialog.this.newLayer = LoadPdfDialog.this.makeLayer(
-                                tr("Imported PDF: ") + fileName, placement, OsmBuilder.Mode.Final, monitor);
+                                tr("Imported PDF: ") + pdfFile, placement, OsmBuilder.Mode.Final, monitor);
                         progressRenderer.finish();
                     }
@@ -722,27 +733,32 @@
     }
 
+    private static JFileChooser loadChooser = null;
+
     private java.io.File chooseFile() {
-        //get file name
-        JFileChooser fc = new JFileChooser();
-        fc.setAcceptAllFileFilterUsed(false);
-        fc.setMultiSelectionEnabled(false);
-        fc.setSelectedFile(this.fileName);
-        fc.setFileFilter(new FileFilter() {
-            @Override
-            public boolean accept(java.io.File pathname) {
-                return pathname.isDirectory() || pathname.getName().endsWith(".pdf");
-            }
-
-            @Override
-            public String getDescription() {
-                return tr("PDF files");
-            }
-        });
-        int result = fc.showOpenDialog(Main.parent);
+        //get PDF file to load
+    	if (loadChooser == null) {
+    		loadChooser = new JFileChooser(Config.getPref().get("plugins.pdfimport.loadDir"));
+    		loadChooser.setAcceptAllFileFilterUsed(false);
+    		loadChooser.setMultiSelectionEnabled(false);
+    		loadChooser.setFileFilter(new FileFilter() {
+    			@Override
+    			public boolean accept(java.io.File pathname) {
+    				return pathname.isDirectory() || pathname.getName().endsWith(".pdf");
+    			}
+
+    			@Override
+    			public String getDescription() {
+    				return tr("PDF files");
+    			}
+    		});
+    	} else {
+    		loadChooser.rescanCurrentDirectory();
+    	}
+        int result = loadChooser.showOpenDialog(this);
 
         if (result != JFileChooser.APPROVE_OPTION) {
             return null;
         } else {
-            return fc.getSelectedFile();
+            return loadChooser.getSelectedFile();
         }
     }
@@ -993,4 +1009,11 @@
         this.minNorthField.setText(Double.toString(placement.minNorth));
         this.maxNorthField.setText(Double.toString(placement.maxNorth));
+        projectionPanel.setEnabled(true);
+        okCancelPanel.setEnabled(true);;
+        this.showButton.setEnabled(true);
+        this.saveButton.setEnabled(true);
+        this.okButton.setEnabled(true);
+        this.getMaxButton.setEnabled(true);
+        this.getMinButton.setEnabled(true);
     }
 
@@ -998,5 +1021,5 @@
         FilePlacement pl = null;
         //load saved transformation
-        File propertiesFile = new File(fileName.getAbsoluteFile()+ ".placement");
+        File propertiesFile = new File(pdfFile.getAbsoluteFile() + ".placement");
         try {
 
@@ -1017,5 +1040,5 @@
     private void savePlacement(FilePlacement pl) {
         //load saved transformation
-        File propertiesFile = new File(fileName.getAbsoluteFile()+ ".placement");
+        File propertiesFile = new File(pdfFile.getAbsoluteFile()+ ".placement");
         try {
             Properties p = pl.toProperties();
@@ -1052,4 +1075,13 @@
             this.layer = null;
         }
+//        projectionPanel.setVisible(false);
+//        okCancelPanel.setVisible(false);
+//        loadProgress.setVisible(false);
+        this.showButton.setEnabled(false);
+        this.saveButton.setEnabled(false);
+        this.okButton.setEnabled(false);
+        this.getMaxButton.setEnabled(false);
+        this.getMinButton.setEnabled(false);
+
     }
 
