Changeset 17506 in josm


Ignore:
Timestamp:
2021-02-21T13:42:52+01:00 (10 days ago)
Author:
Don-vip
Message:

fix #20493 - allow to comment changesets directly from JOSM

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetDiscussionPanel.java

    r17500 r17506  
    124124            try {
    125125                OsmApi.getOsmApi().addCommentToChangeset(current, dialog.getInputText(), null);
    126             } catch (OsmTransferException e) {
     126                actUpdateChangesets.actionPerformed(null);
     127            } catch (OsmTransferException | IllegalArgumentException e) {
    127128                Logging.error(e);
    128129                JOptionPane.showMessageDialog(
    129130                        MainApplication.getMainFrame(),
    130                         ExceptionUtil.explainOsmTransferException(e),
     131                        ExceptionUtil.explainException(e),
    131132                        tr("Error"),
    132133                        JOptionPane.ERROR_MESSAGE);
  • trunk/src/org/openstreetmap/josm/io/OsmApi.java

    r17500 r17506  
    550550        else if (changeset.getId() <= 0)
    551551            throw new IllegalArgumentException(tr("Changeset ID > 0 expected. Got {0}.", changeset.getId()));
    552         sendRequest("POST", "changeset/" + changeset.getId() + "/comment",
    553                 "text=" + Utils.encodeUrl(comment), monitor, "application/x-www-form-urlencoded", true, false);
     552        sendRequest("POST", "changeset/" + changeset.getId() + "/comment?text="+ Utils.encodeUrl(comment),
     553                null, monitor, "application/x-www-form-urlencoded", true, false);
    554554    }
    555555
Note: See TracChangeset for help on using the changeset viewer.