Index: /trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/Main.java	(revision 1824)
+++ /trunk/src/org/openstreetmap/josm/Main.java	(revision 1825)
@@ -220,11 +220,9 @@
 
     /**
-     * Replies true if there is an edit layer which is currently
-     * active
+     * Replies true if there is an edit layer
      *
-     * @return true if there is an edit layer which is currently
-     * active
-     */
-    public boolean hasActiveEditLayer() {
+     * @return true if there is an edit layer
+     */
+    public boolean hasEditLayer() {
         if (map == null) return false;
         if (map.mapView == null) return false;
@@ -250,5 +248,5 @@
      */
     public DataSet getCurrentDataSet() {
-        if (!hasActiveEditLayer()) return null;
+        if (!hasEditLayer()) return null;
         return getEditLayer().data;
     }
Index: /trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 1824)
+++ /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 1825)
@@ -417,4 +417,11 @@
         if (activeLayer instanceof OsmDataLayer)
             return (OsmDataLayer)activeLayer;
+
+        // the first OsmDataLayer is the edit layer
+        //
+        for (Layer layer : layers) {
+            if (layer instanceof OsmDataLayer)
+                return (OsmDataLayer)layer;
+        }
         return null;
     }
