Ignore:
Timestamp:
2021-10-17T15:17:42+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #21427 - further simplify UploadDialog (patch by marcello, modified)

  • The dialog was simplified by combining the function of two radiobuttons and one combobox into one combobox.
  • When an open changeset was selected on tab 2, existing tags on the open changeset could overwrite the data the user entered on tab 1. The user might spot this by looking closely at the tag table on tab 2, but then he may not. This non-obvious behaviour was removed.
  • The exception thrown when closing an already closed changeset was fixed.
  • More cosmetic changes to the dialog.
  • Maybe also a solution to #19319, #21387 (added revalidate()).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java

    r17709 r18283  
    3636import org.openstreetmap.josm.tools.ImageProvider;
    3737import org.openstreetmap.josm.tools.Logging;
     38import org.openstreetmap.josm.tools.Utils;
    3839
    3940/**
     
    8990                // we are at the end. Append an empty row and move the focus to its second column
    9091                String key = ((TagModel) model.getValueAt(row, 0)).getName();
    91                 if (!key.trim().isEmpty()) {
     92                if (!Utils.isStripEmpty(key)) {
    9293                    model.appendNewTag();
    9394                    col = 0;
     
    243244            }
    244245            final int rowIdx = model.getRowCount()-1;
    245             if (rowIdx < 0 || !((TagModel) model.getValueAt(rowIdx, 0)).getName().trim().isEmpty()) {
     246            if (rowIdx < 0 || !Utils.isStripEmpty(((TagModel) model.getValueAt(rowIdx, 0)).getName())) {
    246247                model.appendNewTag();
    247248            }
Note: See TracChangeset for help on using the changeset viewer.