Ignore:
Timestamp:
2017-06-17T23:12:53+02:00 (7 years ago)
Author:
michael2402
Message:

Fix #14946: Set the right data set for tag corrections when reversing a way.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java

    r12356 r12412  
    2626import org.openstreetmap.josm.data.correction.RoleCorrection;
    2727import org.openstreetmap.josm.data.correction.TagCorrection;
     28import org.openstreetmap.josm.data.osm.DataSet;
    2829import org.openstreetmap.josm.data.osm.Node;
    2930import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    5657    };
    5758
     59    /**
     60     * Creates the commands to correct the tags. Asks the users about it.
     61     * @param dataSet The data set the primitives will be in once the commands are executed
     62     * @param tagCorrectionsMap The possible tag corrections
     63     * @param roleCorrectionMap The possible role corrections
     64     * @param description A description to add to the dialog.
     65     * @return A list of commands
     66     * @throws UserCancelException If the user canceled
     67     */
    5868    protected Collection<Command> applyCorrections(
     69            DataSet dataSet,
    5970            Map<OsmPrimitive, List<TagCorrection>> tagCorrectionsMap,
    6071            Map<OsmPrimitive, List<RoleCorrection>> roleCorrectionMap,
     
    175186                    // save the clone
    176187                    if (!keysChanged.isEmpty()) {
    177                         commands.add(new ChangeCommand(primitive.getDataSet(), primitive, clone));
     188                        commands.add(new ChangeCommand(dataSet, primitive, clone));
    178189                    }
    179190                }
     
    185196                        RoleCorrection roleCorrection = roleCorrections.get(i);
    186197                        if (roleTableMap.get(primitive).getCorrectionTableModel().getApply(i)) {
    187                             commands.add(new ChangeRelationMemberRoleCommand(roleCorrection.relation.getDataSet(),
     198                            commands.add(new ChangeRelationMemberRoleCommand(dataSet,
    188199                                    roleCorrection.relation, roleCorrection.position, roleCorrection.newRole));
    189200                        }
Note: See TracChangeset for help on using the changeset viewer.