Index: trunk/src/org/openstreetmap/josm/actions/UpdateModifiedAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UpdateModifiedAction.java	(revision 3090)
+++ trunk/src/org/openstreetmap/josm/actions/UpdateModifiedAction.java	(revision 3092)
@@ -32,12 +32,22 @@
     }
 
+    // FIXME: overrides the behaviour of UpdateSelectionAction. Doesn't update
+    // the enabled state based on the current selection because
+    // it doesn't depend on it.
+    // The action should be enabled/disabled based on whether there is a least
+    // one modified object in the current dataset. Unfortunately, there is no
+    // efficient way to find out here. getDataSet().allModifiedPrimitives() is
+    // too heavy weight because it loops over the whole dataset.
+    // Perhaps this action should  be a DataSetListener? Or it could listen to the
+    // REQUIRES_SAVE_TO_DISK_PROP and REQUIRES_UPLOAD_TO_SERVER_PROP properties
+    // in the OsmLayer?
+    //
     @Override
-    protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
-        super.updateEnabledState(getData());
+    protected void updateEnabledState() {
+        setEnabled(getCurrentDataSet() != null);
     }
 
     @Override
-    protected Collection<OsmPrimitive> getData() {
-        return getCurrentDataSet().allModifiedPrimitives();
+    protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
     }
 }
Index: trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 3090)
+++ trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 3092)
@@ -103,5 +103,5 @@
             setEnabled(false);
         } else {
-            updateEnabledState(getData());
+            updateEnabledState(getCurrentDataSet().getSelected());
         }
     }
@@ -118,5 +118,5 @@
         if (! isEnabled())
             return;
-        Collection<OsmPrimitive> selection = getData();
+        Collection<OsmPrimitive> selection =getCurrentDataSet().getSelected();
         if (selection.size() == 0) {
             JOptionPane.showMessageDialog(
@@ -130,7 +130,3 @@
         updatePrimitives(selection);
     }
-
-    protected Collection<OsmPrimitive> getData() {
-        return getCurrentDataSet().getSelected();
-    }
 }
