Changeset 32005 in osm for applications/editors/josm/plugins/reverter/src
- Timestamp:
- 2016-01-18T21:58:38+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reverter/src/reverter/ReverterUploadHook.java
r29663 r32005 1 1 package reverter; 2 3 import java.util.Map;4 2 5 3 import org.openstreetmap.josm.Main; … … 7 5 import org.openstreetmap.josm.command.Command; 8 6 import org.openstreetmap.josm.data.APIDataSet; 9 import org.openstreetmap.josm.data.Version;10 import org.openstreetmap.josm.gui.io.UploadDialog;11 7 12 8 public class ReverterUploadHook implements UploadHook { … … 26 22 } 27 23 28 UploadDialog ud = UploadDialog.getUploadDialog(); 29 Map<String, String> tags = ud.getDefaultChangesetTags(); 30 String created_by = tags.get("created_by"); 31 if (created_by == null || "".equals(created_by)) { 32 if (hasRevertions) { 33 tags.put("created_by", Version.getInstance().getAgentString(false) + ";" + pluginString); 34 ud.setDefaultChangesetTags(tags); 35 } 36 return true; 24 if (hasRevertions) { 25 Main.main.getCurrentDataSet().addChangeSetTag("created_by", "reverter"); 37 26 } 38 if (hasRevertions) {39 if (!created_by.contains(pluginString)) {40 tags.put("created_by", created_by + ";" + pluginString);41 }42 } else {43 if (created_by.contains(";" + pluginString)) {44 tags.put("created_by", created_by.replace(";" + pluginString, ""));45 }46 }47 ud.setDefaultChangesetTags(tags);48 27 return true; 49 28 }
Note:
See TracChangeset
for help on using the changeset viewer.