Ignore:
Timestamp:
2017-01-22T21:57:07+01:00 (3 years ago)
Author:
michael2402
Message:

Fix #14229: Create notification in UI thread.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java

    r11385 r11488  
    1818
    1919import javax.swing.JOptionPane;
     20import javax.swing.SwingUtilities;
    2021
    2122import org.openstreetmap.josm.Main;
     
    5556
    5657    protected void alertSelectAtLeastOneWay() {
    57         new Notification(
    58                 tr("Please select at least one way to simplify."))
    59                 .setIcon(JOptionPane.WARNING_MESSAGE)
    60                 .setDuration(Notification.TIME_SHORT)
    61                 .setHelpTopic(ht("/Action/SimplifyWay#SelectAWayToSimplify"))
    62                 .show();
     58        SwingUtilities.invokeLater(() ->
     59            new Notification(
     60                    tr("Please select at least one way to simplify."))
     61                    .setIcon(JOptionPane.WARNING_MESSAGE)
     62                    .setDuration(Notification.TIME_SHORT)
     63                    .setHelpTopic(ht("/Action/SimplifyWay#SelectAWayToSimplify"))
     64                    .show()
     65        );
    6366    }
    6467
Note: See TracChangeset for help on using the changeset viewer.