Changeset 18457 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2022-05-25T23:29:07+02:00 (3 years ago)
Author:
taylor.smock
Message:

Fix #22056: source in the dataset tags overrides automatic sources

This ocurred when changeset_source is set via remote control or file load.

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java

    r18283 r18457  
    233233     * @return The source from the layer info.
    234234     */
    235     private String getSourceFromLayer() {
     235    String getSourceFromLayer() {
    236236        String source = MainApplication.getMap().mapView.getLayerInformationForSourceTag();
    237237        return Utils.shortenString(source, Changeset.MAX_CHANGESET_TAG_LENGTH);
  • trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java

    r18283 r18457  
    239239        model.putAll(map);          // init with tags from history
    240240        model.putAll(this.dataSet); // overwrite with tags from the dataset
     241        if (Config.getPref().getBoolean("upload.source.obtainautomatically", false)
     242        && this.dataSet.getChangeSetTags().containsKey(UploadDialogModel.SOURCE)) {
     243            model.put(UploadDialogModel.SOURCE, pnlBasicUploadSettings.getSourceFromLayer());
     244        }
    241245
    242246        tpConfigPanels.setSelectedIndex(0);
  • trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java

    r18287 r18457  
    12791279
    12801280    @Override
     1281    public String getChangesetSourceTag() {
     1282        return this.data.getChangeSetTags().getOrDefault("source", null);
     1283    }
     1284
     1285    @Override
    12811286    public AbstractUploadDialog getUploadDialog() {
    12821287        UploadDialog dialog = UploadDialog.getUploadDialog();
Note: See TracChangeset for help on using the changeset viewer.