Ignore:
Timestamp:
2015-09-14T22:44:28+02:00 (9 years ago)
Author:
simon04
Message:

fix #11686 - Error by uploading changeset with too long tag

Changeset tags table: limit key/value length to allowed maximum of API

File:
1 edited

Legend:

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

    r8510 r8760  
    3636    private TagEditorModel model;
    3737    /** the tag table */
    38     private TagTable tagTable;
     38    private final TagTable tagTable;
    3939
    4040    private PresetListPanel presetListPanel;
     
    4848    protected JPanel buildTagTableEditorPanel() {
    4949        JPanel pnl = new JPanel();
    50         tagTable = new TagTable(model);
    5150        pnl.setLayout(new BorderLayout());
    5251        pnl.add(new JScrollPane(tagTable), BorderLayout.CENTER);
     
    142141     */
    143142    public TagEditorPanel(PresetHandler presetHandler) {
    144         this(null, presetHandler);
     143        this(null, presetHandler, 0);
    145144    }
    146145
     
    150149     *
    151150     * @param model the tag editor model
    152      */
    153     public TagEditorPanel(TagEditorModel model, PresetHandler presetHandler) {
     151     * @param maxCharacters maximum number of characters allowed, 0 for unlimited
     152     */
     153    public TagEditorPanel(TagEditorModel model, PresetHandler presetHandler, final int maxCharacters) {
    154154        this.model = model;
    155155        this.presetHandler = presetHandler;
     
    157157            this.model = new TagEditorModel();
    158158        }
     159        this.tagTable = new TagTable(this.model, maxCharacters);
    159160        build();
    160161    }
Note: See TracChangeset for help on using the changeset viewer.