Changeset 17899 in josm for trunk/src/org


Ignore:
Timestamp:
2021-05-17T19:56:22+02:00 (3 years ago)
Author:
simon04
Message:

fix #20888, see #18949 - Tagging presets (value_template): fix IllegalStateException: Attempt to mutate in notification

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java

    r17793 r17899  
    2222import javax.swing.JPanel;
    2323import javax.swing.JToggleButton;
     24import javax.swing.SwingUtilities;
    2425
    2526import org.openstreetmap.josm.data.osm.Tag;
     
    256257            support.addListener((source, key, newValue) -> {
    257258                if (source != this) {
    258                     textField.setItem(valueTemplate.getText(support));
     259                    String valueTemplateText = valueTemplate.getText(support);
     260                    Logging.trace("Evaluating value_template {0} for key {1} => {2}", valueTemplate, key, valueTemplateText);
     261                    SwingUtilities.invokeLater(() -> textField.setItem(valueTemplateText));
    259262                }
    260263            });
Note: See TracChangeset for help on using the changeset viewer.