Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java	(revision 21201)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java	(revision 21202)
@@ -45,4 +45,5 @@
     private EastNorth georefpoint2;
     private boolean ignoreMouseClick = false;
+    private boolean clickOnTheMap = false;
     
     /**
@@ -133,29 +134,34 @@
             return;
         if (ignoreMouseClick) return; // In case we are currently just allowing zooming to read lambert coordinates
-        countMouseClicked++;
         EastNorth ea = Main.proj.latlon2eastNorth(Main.map.mapView.getLatLon(e.getX(), e.getY()));
         System.out.println("clic:"+countMouseClicked+" ,"+ea+", mode:"+mode);
-        // ignore clicks outside the image
-        if (ea.east() < wmsLayer.images.get(0).min.east() || ea.east() > wmsLayer.images.get(0).max.east()
-                || ea.north() < wmsLayer.images.get(0).min.north() || ea.north() > wmsLayer.images.get(0).max.north())
-            return;
-        if (mode == cGetCorners) {
-            if (countMouseClicked == 1) {
-                ea1 = ea;
-                continueCropping();
-            }
-            if (countMouseClicked == 2) {
-                wmsLayer.cropImage(ea1, ea);
-                Main.map.mapView.repaint();
-                startGeoreferencing();
-            }
-        } else if (mode == cGetLambertCrosspieces) {
-            if (countMouseClicked == 1) {
-                ea1 = ea;
-                inputLambertPosition(); // This will automatically asks for second point and continue the georeferencing
-            }
-            if (countMouseClicked == 2) {
-                ea2 = ea;
-                inputLambertPosition(); // This will automatically ends the georeferencing
+        if (clickOnTheMap) {
+            clickOnTheMap = false;
+            handleNewCoordinates(ea.east(), ea.north());
+        } else {
+            countMouseClicked++;
+            // ignore clicks outside the image
+            if (ea.east() < wmsLayer.images.get(0).min.east() || ea.east() > wmsLayer.images.get(0).max.east()
+                    || ea.north() < wmsLayer.images.get(0).min.north() || ea.north() > wmsLayer.images.get(0).max.north())
+                return;
+            if (mode == cGetCorners) {
+                if (countMouseClicked == 1) {
+                    ea1 = ea;
+                    continueCropping();
+                }
+                if (countMouseClicked == 2) {
+                    wmsLayer.cropImage(ea1, ea);
+                    Main.map.mapView.repaint();
+                    startGeoreferencing();
+                }
+            } else if (mode == cGetLambertCrosspieces) {
+                if (countMouseClicked == 1) {
+                    ea1 = ea;
+                    inputLambertPosition(); // This will automatically asks for second point and continue the georeferencing
+                }
+                if (countMouseClicked == 2) {
+                    ea2 = ea;
+                    inputLambertPosition(); // This will automatically ends the georeferencing
+                }
             }
         }
@@ -249,4 +255,6 @@
         Main.map.mapView.repaint();
         actionCompleted();
+        clickOnTheMap = false;
+        ignoreMouseClick = false;
     }
 
@@ -289,7 +297,10 @@
         p.add(labelNorth, GBC.std().insets(0, 0, 10, 0));
         p.add(inputNorth, GBC.eol().fill(GBC.HORIZONTAL).insets(10, 5, 0, 5));
+        final Object[] options = {tr("OK"),
+                tr("Cancel"),
+                tr("I use the mouse")};
         final JOptionPane pane = new JOptionPane(p,
-                JOptionPane.INFORMATION_MESSAGE, JOptionPane.OK_CANCEL_OPTION,
-                null);
+                JOptionPane.INFORMATION_MESSAGE, JOptionPane.YES_NO_CANCEL_OPTION,
+                null, options, options[0]);
         String number;
         if (countMouseClicked == 1)
@@ -308,23 +319,25 @@
                 if (JOptionPane.VALUE_PROPERTY.equals(evt.getPropertyName())) {
                     ignoreMouseClick = false;
-                    if (!Integer.valueOf(JOptionPane.OK_OPTION).equals(
-                            pane.getValue())) {
+                    // Cancel
+                    if (pane.getValue().equals(options[1])) {
                         if (canceledOrRestartCurrAction("georeferencing"))
                             startGeoreferencing();
                     }
-                    if (inputEast.getText().length() != 0
-                            && inputNorth.getText().length() != 0) {
-                        try {
-                            double e = Double.parseDouble(inputEast.getText());
-                            double n = Double.parseDouble(inputNorth.getText());
-                            if (countMouseClicked == 1) {
-                                georefpoint1 = new EastNorth(e, n);
-                                continueGeoreferencing();
-                            } else {
-                                georefpoint2 = new EastNorth(e, n);
-                                endGeoreferencing();
+                    // Click on the map
+                    if (pane.getValue().equals(options[2])) {
+                        clickOnTheMap = true;
+                    } else {
+                    // OK (coordinates manually entered)
+                        clickOnTheMap = false;
+                        if (inputEast.getText().length() != 0
+                                && inputNorth.getText().length() != 0) {
+                            double e, n;
+                            try {
+                                e = Double.parseDouble(inputEast.getText());
+                                n = Double.parseDouble(inputNorth.getText());
+                            } catch (NumberFormatException ex) {
+                                return;
                             }
-                        } catch (NumberFormatException e) {
-                            return;
+                            handleNewCoordinates(e, n);
                         }
                     }
@@ -332,4 +345,14 @@
             }
         });
+    }
+
+    private void handleNewCoordinates(double e, double n) {
+        if (countMouseClicked == 1) {
+            georefpoint1 = new EastNorth(e, n);
+            continueGeoreferencing();
+        } else {
+            georefpoint2 = new EastNorth(e, n);
+            endGeoreferencing();
+        }
     }
 
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java	(revision 21201)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java	(revision 21202)
@@ -78,5 +78,9 @@
         }
         inputDepartement.setToolTipText(tr("<html>Departement number (optional)</html>"));
-
+        if (!Main.pref.get("cadastrewms.codeDepartement").equals("")) {
+            for (int i=0; i < departements.length; i=i+2)
+                if (departements[i].equals(Main.pref.get("cadastrewms.codeDepartement")))
+                    inputDepartement.setSelectedIndex(i/2);        
+        }
         p.add(labelSectionNewLocation, GBC.eol());
         p.add(labelLocation, GBC.std().insets(10, 0, 0, 0));
@@ -104,4 +108,5 @@
             Main.pref.put("cadastrewms.location", location);
             Main.pref.put("cadastrewms.codeCommune", codeCommune);
+            Main.pref.put("cadastrewms.codeDepartement", codeDepartement);
             if (Main.map != null) {
                 for (Layer l : Main.map.mapView.getAllLayers()) {
