Changeset 3093 in josm for trunk


Ignore:
Timestamp:
2010-03-07T14:41:05+01:00 (10 years ago)
Author:
Gubaer
Message:

Ouch, shouldn't have removed getData(). Fixes the previous commit.

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/UpdateModifiedAction.java

    r3092 r3093  
    77import java.awt.event.KeyEvent;
    88import java.util.Collection;
     9import java.util.Collections;
    910
    1011import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    5152    protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
    5253    }
     54
     55    @Override
     56    public Collection<OsmPrimitive> getData() {
     57        if (getCurrentDataSet() == null) return Collections.emptyList();
     58        return getCurrentDataSet().allModifiedPrimitives();
     59    }
    5360}
  • trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java

    r3092 r3093  
    118118        if (! isEnabled())
    119119            return;
    120         Collection<OsmPrimitive> selection =getCurrentDataSet().getSelected();
    121         if (selection.size() == 0) {
     120        Collection<OsmPrimitive> toUpdate =getData();
     121        if (toUpdate.size() == 0) {
    122122            JOptionPane.showMessageDialog(
    123123                    Main.parent,
     
    128128            return;
    129129        }
    130         updatePrimitives(selection);
     130        updatePrimitives(toUpdate);
     131    }
     132
     133    public Collection<OsmPrimitive> getData() {
     134        return getCurrentDataSet().getSelected();
    131135    }
    132136}
Note: See TracChangeset for help on using the changeset viewer.