Index: trunk/src/org/openstreetmap/josm/actions/UploadAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/UploadAction.java	(revision 9512)
+++ trunk/src/org/openstreetmap/josm/actions/UploadAction.java	(revision 9514)
@@ -7,11 +7,8 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
-import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.Map;
 
 import javax.swing.JOptionPane;
-import javax.swing.SwingUtilities;
 
 import org.openstreetmap.josm.Main;
@@ -234,22 +231,5 @@
 
         final UploadDialog dialog = UploadDialog.getUploadDialog();
-        // If we simply set the changeset comment here, it would be
-        // overridden by subsequent events in EDT that are caused by
-        // dialog creation. The current solution is to queue this operation
-        // after these events.
-        // TODO: find better way to initialize the comment field
-        SwingUtilities.invokeLater(new Runnable() {
-            @Override
-            public void run() {
-                final Map<String, String> tags = new HashMap<>(layer.data.getChangeSetTags());
-                if (!tags.containsKey("source")) {
-                    tags.put("source", dialog.getLastChangesetSourceFromHistory());
-                }
-                if (!tags.containsKey("comment")) {
-                    tags.put("comment", dialog.getLastChangesetCommentFromHistory());
-                }
-                dialog.setDefaultChangesetTags(tags);
-            }
-        });
+        dialog.setChangesetTags(layer.data);
         dialog.setUploadedPrimitives(apiData);
         dialog.setVisible(true);
Index: trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java	(revision 9512)
+++ trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java	(revision 9514)
@@ -290,5 +290,4 @@
                 Changeset cs = (Changeset) cbOpenChangesets.getSelectedItem();
                 if (cs == null) return;
-                changesetCommentModel.setComment(cs.get("comment"));
                 firePropertyChange(SELECTED_CHANGESET_PROP, null, cs);
             }
Index: trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 9512)
+++ trunk/src/org/openstreetmap/josm/gui/io/TagSettingsPanel.java	(revision 9514)
@@ -3,5 +3,5 @@
 
 import java.awt.BorderLayout;
-import java.util.HashMap;
+import java.util.Collections;
 import java.util.Map;
 import java.util.Observable;
@@ -13,6 +13,6 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.Version;
 import org.openstreetmap.josm.data.osm.Changeset;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.tagging.TagEditorPanel;
 import org.openstreetmap.josm.gui.tagging.TagModel;
@@ -26,6 +26,4 @@
     private final transient ChangesetCommentModel changesetCommentModel;
     private final transient ChangesetCommentModel changesetSourceModel;
-    /** tags that applied to uploaded changesets by default*/
-    private final transient Map<String, String> defaultTags = new HashMap<>();
 
     protected void build() {
@@ -81,25 +79,8 @@
 
     /**
-     * Initialize panel from changeset.
-     * @param cs changeset
+     * Initialize panel from the given tags.
+     * @param tags the tags used to initialize the panel
      */
-    public void initFromChangeset(Changeset cs) {
-        Map<String, String> tags = getDefaultTags();
-        if (cs != null) {
-            tags.putAll(cs.getKeys());
-        }
-        if (tags.get("comment") == null) {
-            tags.put("comment", getTagEditorValue("comment"));
-        }
-        if (tags.get("source") == null) {
-            tags.put("source", getTagEditorValue("source"));
-        }
-        String agent = Version.getInstance().getAgentString(false);
-        String created_by = tags.get("created_by");
-        if (created_by == null || created_by.isEmpty()) {
-            tags.put("created_by", agent);
-        } else if (!created_by.contains(agent)) {
-            tags.put("created_by", created_by + ';' + agent);
-        }
+    public void initFromTags(Map<String, String> tags) {
         pnlTagEditor.getModel().initFromTags(tags);
     }
@@ -115,21 +96,18 @@
 
     /**
-     * Replies the map with the default tags.
-     * @return the map with the default tags
+     * @return an empty map
+     * @deprecated No longer supported, returns an empty map
      */
+    @Deprecated
     public Map<String, String> getDefaultTags() {
-        Map<String, String> tags = new HashMap<>();
-        tags.putAll(defaultTags);
-        return tags;
+        return Collections.emptyMap();
     }
 
     /**
-     * Sets the map with the default tags.
-     * @param tags the map with the default tags
+     * @param tags ignored
+     * @deprecated No longer supported, does nothing; use {@link UploadDialog#setChangesetTags(DataSet)} instead!
      */
+    @Deprecated
     public void setDefaultTags(Map<String, String> tags) {
-        defaultTags.clear();
-        defaultTags.putAll(tags);
-        tableChanged(null);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 9512)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 9514)
@@ -20,4 +20,6 @@
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -39,5 +41,7 @@
 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
 import org.openstreetmap.josm.data.Preferences.Setting;
+import org.openstreetmap.josm.data.Version;
 import org.openstreetmap.josm.data.osm.Changeset;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.gui.ExtendedDialog;
@@ -101,4 +105,6 @@
     private final transient ChangesetCommentModel changesetSourceModel = new ChangesetCommentModel();
 
+    private transient DataSet dataSet;
+
     /**
      * builds the content panel for the upload dialog
@@ -194,4 +200,5 @@
         // changes
         //
+        pnlChangesetManagement.addPropertyChangeListener(this);
         pnlChangesetManagement.addPropertyChangeListener(
                 pnlBasicUploadSettings.getUploadParameterSummaryPanel()
@@ -267,4 +274,55 @@
     }
 
+    /**
+     * Sets the tags for this upload based on (later items overwrite earlier ones):
+     * <ul>
+     * <li>previous "source" and "comment" input</li>
+     * <li>the tags set in the dataset (see {@link DataSet#getChangeSetTags()})</li>
+     * <li>the tags from the selected open changeset</li>
+     * <li>the JOSM user agent (see {@link Version#getAgentString(boolean)})</li>
+     * </ul>
+     *
+     * @param dataSet to obtain the tags set in the dataset
+     */
+    public void setChangesetTags(DataSet dataSet) {
+        final Map<String, String> tags = new HashMap<>();
+
+        // obtain from previos input
+        tags.put("source", getLastChangesetSourceFromHistory());
+        tags.put("comment", getLastChangesetCommentFromHistory());
+
+        // obtain from dataset
+        if (dataSet != null) {
+            tags.putAll(dataSet.getChangeSetTags());
+        }
+        this.dataSet = dataSet;
+
+        // obtain from selected open changeset
+        if (pnlChangesetManagement.getSelectedChangeset() != null) {
+            tags.putAll(pnlChangesetManagement.getSelectedChangeset().getKeys());
+        }
+
+        // set/adapt created_by
+        final String agent = Version.getInstance().getAgentString(false);
+        final String created_by = tags.get("created_by");
+        if (created_by == null || created_by.isEmpty()) {
+            tags.put("created_by", agent);
+        } else if (!created_by.contains(agent)) {
+            tags.put("created_by", created_by + ';' + agent);
+        }
+
+        // remove empty values
+        final Iterator<String> it = tags.keySet().iterator();
+        while (it.hasNext()) {
+            final String v = tags.get(it.next());
+            if (v == null || v.isEmpty()) {
+                it.remove();
+            }
+        }
+
+        pnlTagSettings.initFromTags(tags);
+        pnlTagSettings.tableChanged(null);
+    }
+
     @Override
     public void rememberUserInput() {
@@ -280,5 +338,4 @@
         pnlBasicUploadSettings.startUserInput();
         pnlTagSettings.startUserInput();
-        pnlTagSettings.initFromChangeset(pnlChangesetManagement.getSelectedChangeset());
         pnlUploadStrategySelectionPanel.initFromPreferences();
         UploadParameterSummaryPanel pnl = pnlBasicUploadSettings.getUploadParameterSummaryPanel();
@@ -310,8 +367,9 @@
     }
 
+    /**
+     * @deprecated No longer supported, does nothing; use {@link #setChangesetTags(DataSet)} instead!
+     */
+    @Deprecated
     public void setDefaultChangesetTags(Map<String, String> tags) {
-        pnlTagSettings.setDefaultTags(tags);
-        changesetCommentModel.setComment(tags.get("comment"));
-        changesetSourceModel.setComment(tags.get("source"));
     }
 
@@ -543,4 +601,5 @@
         if (evt.getPropertyName().equals(ChangesetManagementPanel.SELECTED_CHANGESET_PROP)) {
             Changeset cs = (Changeset) evt.getNewValue();
+            setChangesetTags(dataSet);
             if (cs == null) {
                 tpConfigPanels.setTitleAt(1, tr("Tags of new changeset"));
