Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 13426)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 13434)
@@ -12,4 +12,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.UserIdentityManager;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -102,7 +103,7 @@
 
         if (Main.main != null) {
-            OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer();
-            if (editLayer != null) {
-                editLayer.data.addDataSetListener(this);
+            DataSet ds = MainApplication.getLayerManager().getActiveDataSet();
+            if (ds != null) {
+                ds.addDataSetListener(this);
             }
         }
@@ -169,7 +170,7 @@
         if (history.getNumVersions() > 0) {
             HistoryOsmPrimitive newLatest = null;
-            OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer();
-            if (editLayer != null) {
-                OsmPrimitive p = editLayer.data.getPrimitiveById(history.getId(), history.getType());
+            DataSet ds = MainApplication.getLayerManager().getActiveDataSet();
+            if (ds != null) {
+                OsmPrimitive p = ds.getPrimitiveById(history.getId(), history.getType());
                 if (canShowAsLatest(p)) {
                     newLatest = new HistoryPrimitiveBuilder().build(p);
@@ -530,7 +531,7 @@
      */
     public void unlinkAsListener() {
-        OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer();
-        if (editLayer != null) {
-            editLayer.data.removeDataSetListener(this);
+        DataSet ds = MainApplication.getLayerManager().getActiveDataSet();
+        if (ds != null) {
+            ds.removeDataSetListener(this);
         }
         MainApplication.getLayerManager().removeActiveLayerChangeListener(this);
Index: trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java	(revision 13426)
+++ trunk/src/org/openstreetmap/josm/gui/history/NodeListViewer.java	(revision 13434)
@@ -22,4 +22,5 @@
 
 import org.openstreetmap.josm.actions.AutoScaleAction;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
@@ -29,5 +30,4 @@
 import org.openstreetmap.josm.data.osm.history.HistoryDataSet;
 import org.openstreetmap.josm.gui.MainApplication;
-import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.gui.util.AdjustmentSynchronizer;
 import org.openstreetmap.josm.gui.util.GuiHelper;
@@ -249,7 +249,7 @@
             OsmPrimitive p = getPrimitiveToZoom();
             if (p != null) {
-                OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer();
-                if (editLayer != null) {
-                    editLayer.data.setSelected(p.getPrimitiveId());
+                DataSet ds = MainApplication.getLayerManager().getActiveDataSet();
+                if (ds != null) {
+                    ds.setSelected(p.getPrimitiveId());
                     AutoScaleAction.autoScale("selection");
                 }
@@ -265,12 +265,12 @@
             if (primitiveId == null)
                 return null;
-            OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer();
-            if (editLayer == null)
+            DataSet ds = MainApplication.getLayerManager().getActiveDataSet();
+            if (ds == null)
                 return null;
-            return editLayer.data.getPrimitiveById(primitiveId);
+            return ds.getPrimitiveById(primitiveId);
         }
 
         public void updateEnabledState() {
-            setEnabled(MainApplication.getLayerManager().getEditLayer() != null && getPrimitiveToZoom() != null);
+            setEnabled(MainApplication.getLayerManager().getActiveDataSet() != null && getPrimitiveToZoom() != null);
         }
     }
