diff --git a/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java b/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
index 0558cfec56..1e0d9b6af0 100644
|
a
|
b
|
public class BasicUploadSettingsPanel extends JPanel implements ActionListener,
|
| 232 | 232 | * Add the "source" tag |
| 233 | 233 | * @return The source from the layer info. |
| 234 | 234 | */ |
| 235 | | private String getSourceFromLayer() { |
| | 235 | String getSourceFromLayer() { |
| 236 | 236 | String source = MainApplication.getMap().mapView.getLayerInformationForSourceTag(); |
| 237 | 237 | return Utils.shortenString(source, Changeset.MAX_CHANGESET_TAG_LENGTH); |
| 238 | 238 | } |
diff --git a/src/org/openstreetmap/josm/gui/io/UploadDialog.java b/src/org/openstreetmap/josm/gui/io/UploadDialog.java
index 94b852d758..08f8c92f23 100644
|
a
|
b
|
public class UploadDialog extends AbstractUploadDialog implements PreferenceChan
|
| 238 | 238 | model.clear(); |
| 239 | 239 | model.putAll(map); // init with tags from history |
| 240 | 240 | 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 | } |
| 241 | 245 | |
| 242 | 246 | tpConfigPanels.setSelectedIndex(0); |
| 243 | 247 | pnlTagEditor.initAutoCompletion(MainApplication.getLayerManager().getEditLayer()); |
diff --git a/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java b/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
index e804bb9d5d..d862582f82 100644
|
a
|
b
|
public class OsmDataLayer extends AbstractOsmDataLayer implements Listener, Data
|
| 1277 | 1277 | dialog.getChangeset()); |
| 1278 | 1278 | } |
| 1279 | 1279 | |
| | 1280 | @Override |
| | 1281 | public String getChangesetSourceTag() { |
| | 1282 | return this.data.getChangeSetTags().getOrDefault("source", null); |
| | 1283 | } |
| | 1284 | |
| 1280 | 1285 | @Override |
| 1281 | 1286 | public AbstractUploadDialog getUploadDialog() { |
| 1282 | 1287 | UploadDialog dialog = UploadDialog.getUploadDialog(); |