Changeset 18896 in osm


Ignore:
Timestamp:
2009-12-02T17:35:10+01:00 (15 years ago)
Author:
rcernoch
Message:

CzechAddress: Bugfix 'unassigned houses'

Location:
applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.form

    r15558 r18896  
    2626          <Group type="103" groupAlignment="0" attributes="0">
    2727              <Group type="102" alignment="1" attributes="0">
    28                   <Component id="streetComboBox" pref="199" max="32767" attributes="0"/>
     28                  <Component id="streetComboBox" pref="175" max="32767" attributes="0"/>
    2929                  <EmptySpace max="-2" attributes="0"/>
    3030                  <Component id="relocateButton" min="-2" max="-2" attributes="0"/>
    3131              </Group>
    3232              <Group type="102" alignment="0" attributes="0">
    33                   <Component id="keepOddityCheckBox" pref="278" max="32767" attributes="0"/>
     33                  <Component id="keepOddityCheckBox" pref="282" max="32767" attributes="0"/>
    3434                  <EmptySpace max="-2" attributes="0"/>
    3535              </Group>
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java

    r15585 r18896  
    11package org.openstreetmap.josm.plugins.czechaddress.gui;
    22
     3import java.util.Set;
    34import org.openstreetmap.josm.plugins.czechaddress.gui.utils.HalfCookedListModel;
    45import org.openstreetmap.josm.plugins.czechaddress.gui.utils.HalfCookedComboBoxModel;
     
    182183            } while ((oldNum + newNum) % 2 == 1 &&
    183184                     houseList.getSelectedIndex() != 0);
    184            
     185
     186        // If anything goes wrong, we can silently ignore the errors.
     187        // The selected item just does not get updated...
    185188        } catch (Exception exp) {}
    186189    }
     
    424427            super("nepřiřazené domy");
    425428            Reasoner.getInstance().addListener(this);
    426 
    427             for (AddressElement house : Reasoner.getInstance().getUnassignedElements())
    428                 if (house instanceof House)
    429                     houses.add((House) house);
    430 
    431             Collections.sort(houses);
    432429        }
    433430
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/intelligence/Reasoner.java

    r17603 r18896  
    206206            matches = new HashMap<AddressElement, Integer>();
    207207            primMatchIndex.put(prim, matches);
     208            primToUpdate.add(prim);
    208209        }
    209210
     
    233234            matches = new HashMap<OsmPrimitive, Integer>();
    234235            elemMatchIndex.put(elem, matches);
     236            elemToUpdate.add(elem);
    235237        }
    236238
     
    313315    private int getQ(OsmPrimitive prim, AddressElement elem) {
    314316
    315         // TODO: This is a workaround. We should not be here at all.
    316317        if (elemMatchIndex.get(elem) == null) return MATCH_NOMATCH;
    317318        if (primMatchIndex.get(prim) == null) return MATCH_NOMATCH;
     
    394395     *
    395396     * <p>This method is probably the single most used method of the reasoner.
    396      * It allows the unique translation between map and the database.</p>
     397     * It allows the unique translation between the map and the database.</p>
    397398     *
    398399     * <p>An element <i>elem</i> and primitive <i>prim</i> can be translated
Note: See TracChangeset for help on using the changeset viewer.