- Timestamp:
- 2010-03-07T14:41:05+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/UpdateModifiedAction.java
r3092 r3093 7 7 import java.awt.event.KeyEvent; 8 8 import java.util.Collection; 9 import java.util.Collections; 9 10 10 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 51 52 protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) { 52 53 } 54 55 @Override 56 public Collection<OsmPrimitive> getData() { 57 if (getCurrentDataSet() == null) return Collections.emptyList(); 58 return getCurrentDataSet().allModifiedPrimitives(); 59 } 53 60 } -
trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
r3092 r3093 118 118 if (! isEnabled()) 119 119 return; 120 Collection<OsmPrimitive> selection =getCurrentDataSet().getSelected();121 if ( selection.size() == 0) {120 Collection<OsmPrimitive> toUpdate =getData(); 121 if (toUpdate.size() == 0) { 122 122 JOptionPane.showMessageDialog( 123 123 Main.parent, … … 128 128 return; 129 129 } 130 updatePrimitives(selection); 130 updatePrimitives(toUpdate); 131 } 132 133 public Collection<OsmPrimitive> getData() { 134 return getCurrentDataSet().getSelected(); 131 135 } 132 136 }
Note:
See TracChangeset
for help on using the changeset viewer.