Ignore:
Timestamp:
2010-11-07T21:34:20+01:00 (14 years ago)
Author:
oliverw
Message:

Bugfix: GuessAddressDataAction showed wrong state/refused work in some cases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/gui/actions/GuessAddressDataAction.java

    r24134 r24147  
    4444        @Override
    4545        public void updateEnabledState(AddressEditSelectionEvent ev) {
    46                 setEnabled(ev != null && ev.getUnresolvedAddressTable() != null);
     46                setEnabled(ev != null && ev.hasAddresses());
    4747        }
    4848
     
    5252        @Override
    5353        protected void updateEnabledState(AddressEditContainer container) {
    54                 setEnabled(container != null && container.getNumberOfIncompleteAddresses() > 0);
     54                setEnabled(container != null && container.getNumberOfInvalidAddresses() > 0);
    5555        }
    5656
     
    6060        @Override
    6161        public void addressEditActionPerformed(AddressEditContainer container) {
    62                 if (container == null) return;
    63                 if (container.getNumberOfUnresolvedAddresses() == 0) return;
    64                                
     62                if (container == null || container.getNumberOfInvalidAddresses() == 0) return;
     63                                               
    6564                internalGuessAddresses(container.getAllAddressesToFix());
    6665        }
Note: See TracChangeset for help on using the changeset viewer.