Changeset 35972 in osm for applications/editors/josm/plugins
- Timestamp:
- 2022-05-25T20:00:14+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reverter/src/reverter/ReverterUploadHook.java
r35868 r35972 1 1 // License: GPL. For details, see LICENSE file. 2 2 package reverter; 3 4 import java.util.Map; 5 import java.util.Objects; 3 6 4 7 import org.openstreetmap.josm.actions.upload.UploadHook; 5 8 import org.openstreetmap.josm.command.Command; 6 9 import org.openstreetmap.josm.command.SequenceCommand; 7 import org.openstreetmap.josm.data.APIDataSet;8 10 import org.openstreetmap.josm.data.UndoRedoHandler; 9 11 import org.openstreetmap.josm.gui.MainApplication; … … 26 28 27 29 @Override 28 public boolean checkUpload(APIDataSet apiDataSet) {30 public void modifyChangesetTags(Map<String, String> tags) { 29 31 if (ReverterPlugin.reverterUsed.get()) { 30 32 for (Command cmd : UndoRedoHandler.getInstance().getUndoCommands()) { 31 if ( isReverterCmd(cmd)) {32 MainApplication.getLayerManager().getEditDataSet().addChangeSetTag("created_by", pluginString);33 if (Objects.equals(MainApplication.getLayerManager().getEditDataSet(), cmd.getAffectedDataSet()) && isReverterCmd(cmd)) { 34 tags.put("created_by", pluginString); 33 35 break; 34 36 } 35 37 } 36 38 } 37 return true;38 39 } 39 40
Note:
See TracChangeset
for help on using the changeset viewer.