Changeset 23922 in osm for applications/editors


Ignore:
Timestamp:
2010-10-30T17:58:45+02:00 (14 years ago)
Author:
oliverw
Message:

Bugfix: Work on shadowed list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/ApplyAllGuessesAction.java

    r23921 r23922  
    1717
    1818import java.awt.event.ActionEvent;
     19import java.util.ArrayList;
    1920import java.util.List;
    2021
     
    2627
    2728        public ApplyAllGuessesAction() {
    28                 super(tr("Apply all guesses"), "applyguesses_24", "Turns all guesses into the corresponding tag values.");
     29                //super(tr("Apply all guesses"), "applyguesses_24", "Turns all guesses into the corresponding tag values.");
     30                super(tr("Apply all guesses"), null, "Turns all guesses into the corresponding tag values.");
    2931        }
    3032
    3133        @Override
    3234        public void addressEditActionPerformed(AddressEditSelectionEvent ev) {
     35                if (ev == null || ev.getSelectedUnresolvedAddresses() == null) return;
    3336                // fix SELECTED items only
    3437                List<AddressNode> addrToFix = ev.getSelectedUnresolvedAddresses();
     
    5356
    5457        private void applyGuesses(List<AddressNode> addrToFix) {
    55                 for (AddressNode aNode : addrToFix) {
     58                List<AddressNode> addrToFixShadow = new ArrayList<AddressNode>(addrToFix);
     59                for (AddressNode aNode : addrToFixShadow) {
    5660                        aNode.applyAllGuesses();
    5761                }
Note: See TracChangeset for help on using the changeset viewer.