Changeset 1613 in josm for trunk/src/org


Ignore:
Timestamp:
2009-05-23T20:24:40+02:00 (16 years ago)
Author:
stoecker
Message:

fixed #2172 - Teemu Koskinen - ReverseWayTagCorrector's role correction broken

Location:
trunk/src/org/openstreetmap/josm
Files:
5 edited

Legend:

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

    r1514 r1613  
    4747
    4848            for (String key : m.keySet()) {
    49                 if (! key.equals("created_by"))
    50                     clist.add(new ChangePropertyCommand(selectionSubset, key, osm.keys.get(key)));
     49                clist.add(new ChangePropertyCommand(selectionSubset, key, osm.keys.get(key)));
    5150            }
    5251        }
     
    9089                continue;
    9190            for (String key : osm.keys.keySet()) {
    92                 if (key.equals("created_by")) // we ignore created_by
    93                     continue;
    9491                String value = osm.keys.get(key);
    9592                if (! kvSeen.containsKey(key))
  • trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java

    r1523 r1613  
    6767                try
    6868                {
    69                     final Collection<Command> changePropertyCommands = reverseWayTagCorrector.execute(wnew);
     69                    final Collection<Command> changePropertyCommands = reverseWayTagCorrector.execute(w, wnew);
    7070                    propertiesUpdated = propertiesUpdated
    7171                        || (changePropertyCommands != null && !changePropertyCommands.isEmpty());
  • trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java

    r1195 r1613  
    3535            this.b = b;
    3636            startPattern = Pattern.compile(
    37                     "^(" + a + "|" + b + ")" + SEPARATOR,
     37                    "^(" + a + "|" + b + ")(" + SEPARATOR + "|$)",
    3838                    Pattern.CASE_INSENSITIVE);
    3939            endPattern = Pattern.compile(
     
    6868
    6969    @Override
    70     public Collection<Command> execute(Way way) throws UserCancelException {
     70    public Collection<Command> execute(Way oldway, Way way) throws UserCancelException {
    7171        Map<OsmPrimitive, List<TagCorrection>> tagCorrectionsMap =
    7272                new HashMap<OsmPrimitive, List<TagCorrection>>();
     
    113113        for (Relation relation : Main.ds.relations) {
    114114            for (RelationMember member : relation.members) {
    115                 if (!member.member.realEqual(way, true)
     115                if (!member.member.realEqual(oldway, true)
    116116                        || member.role.length() == 0)
    117117                    continue;
  • trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java

    r1205 r1613  
    3333public abstract class TagCorrector<P extends OsmPrimitive> {
    3434
    35     public abstract Collection<Command> execute(P primitive)
     35    public abstract Collection<Command> execute(P primitive, P oldprimitive)
    3636        throws UserCancelException;
    3737
  • trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java

    r1606 r1613  
    228228            value = null; // delete the key instead
    229229        }
    230         if (newkey.equals("created_by"))
    231         {
    232             // we don't allow created_by to be changed.
    233             return;
    234         }
    235230        if (key.equals(newkey) || value == null)
    236231            Main.main.undoRedo.add(new ChangePropertyCommand(sel, newkey, value));
     
    349344        if (value.equals(""))
    350345            return;
    351         if (key.equals("created_by"))
    352             return;
    353346        Main.main.undoRedo.add(new ChangePropertyCommand(sel, key, value));
    354347        DataSet.fireSelectionChanged(sel);
Note: See TracChangeset for help on using the changeset viewer.