diff --git a/src/org/openstreetmap/josm/actions/RenameLayerAction.java b/src/org/openstreetmap/josm/actions/RenameLayerAction.java
index b5bd308..c459b50 100644
--- a/src/org/openstreetmap/josm/actions/RenameLayerAction.java
+++ b/src/org/openstreetmap/josm/actions/RenameLayerAction.java
@@ -85,7 +85,7 @@ public class RenameLayerAction extends AbstractAction {
                 File newFile = new File(newname);
                 if (Main.platform.rename(file, newFile)) {
                     layer.setAssociatedFile(newFile);
-                    nameText = newFile.getName();
+                    if (!layer.isRenamed()) nameText = newFile.getName();
                 } else {
                     JOptionPane.showMessageDialog(
                             Main.parent,
@@ -97,7 +97,7 @@ public class RenameLayerAction extends AbstractAction {
                 }
             }
         }
-        layer.setName(nameText);
+        layer.rename(nameText);
         Main.parent.repaint();
     }
 }
diff --git a/src/org/openstreetmap/josm/actions/SaveActionBase.java b/src/org/openstreetmap/josm/actions/SaveActionBase.java
index 0eebdae..70bba1f 100644
--- a/src/org/openstreetmap/josm/actions/SaveActionBase.java
+++ b/src/org/openstreetmap/josm/actions/SaveActionBase.java
@@ -92,7 +92,7 @@ public abstract class SaveActionBase extends DiskAccessAction {
             } else if (canceled) {
                 return false;
             }
-            layer.setName(file.getName());
+            if (!layer.isRenamed()) layer.setName(file.getName());
             layer.setAssociatedFile(file);
             if (layer instanceof OsmDataLayer) {
                 ((OsmDataLayer) layer).onPostSaveToFile();
diff --git a/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java b/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
index 0ea557b..4223c02 100644
--- a/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
+++ b/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
@@ -1600,7 +1600,7 @@ public class LayerListDialog extends ToggleDialog {
                     l.setVisible((Boolean) value);
                     break;
                 case 2:
-                    l.setName((String) value);
+                    l.rename((String) value);
                     break;
                 default: throw new RuntimeException();
                 }
diff --git a/src/org/openstreetmap/josm/gui/layer/Layer.java b/src/org/openstreetmap/josm/gui/layer/Layer.java
index 2357a2f..00ef037 100644
--- a/src/org/openstreetmap/josm/gui/layer/Layer.java
+++ b/src/org/openstreetmap/josm/gui/layer/Layer.java
@@ -114,7 +114,12 @@ public abstract class Layer implements Destroyable, MapViewPaintable, Projection
      * The name of this layer.
      *
      */
-    private  String name;
+    private String name;
+
+    /**
+     * This is set if user renamed this layer.
+     */
+    private boolean renamed = false;
 
     /**
      * If a file is associated with this layer, this variable should be set to it.
@@ -263,7 +268,7 @@ public abstract class Layer implements Destroyable, MapViewPaintable, Projection
     /**
      * Sets the name of the layer
      *
-     *@param name the name. If null, the name is set to the empty string.
+     * @param name the name. If null, the name is set to the empty string.
      *
      */
     public final void setName(String name) {
@@ -278,6 +283,26 @@ public abstract class Layer implements Destroyable, MapViewPaintable, Projection
     }
 
     /**
+     * Rename layer and set renamed flag to mark it as renamed (has user given name).
+     *
+     * @param name the name. If null, the name is set to the empty string.
+     *
+     */
+    public final void rename(String name) {
+        renamed = true;
+        setName(name);
+    }
+
+    /**
+     * Replies true if this layer was renamed by user
+     *
+     * @return true if this layer was renamed by user
+     */
+    public boolean isRenamed() {
+        return renamed;
+    }
+
+    /**
      * Replies true if this layer is a background layer
      *
      * @return true if this layer is a background layer
