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


Ignore:
Timestamp:
2021-07-11T04:02:42+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #20969 - fix trimming/synchronization issue in changeset upload comment input field (patch by Bjoeni)

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

Legend:

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

    r17898 r17995  
    411411            if (!(e.getSource() instanceof ChangesetCommentModel)) return;
    412412            String newComment = ((ChangesetCommentModel) e.getSource()).getComment();
    413             if (!destination.getText().equals(newComment)) {
     413            if (!destination.getText().trim().equals(newComment)) {
    414414                destination.setText(newComment);
    415415            }
  • trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java

    r16643 r17995  
    2525    public void setComment(String comment) {
    2626        String oldValue = this.comment;
    27         this.comment = comment == null ? "" : comment;
     27        this.comment = comment == null ? "" : comment.trim();
    2828        if (!Objects.equals(oldValue, this.comment)) {
    2929            fireStateChanged();
Note: See TracChangeset for help on using the changeset viewer.