Changeset 10621 in josm


Ignore:
Timestamp:
2016-07-24T13:13:18+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #13197 - bad use of method references instead of lambdas, causing graphical objects to be created in another thread than EDT

Location:
trunk/src/org/openstreetmap/josm
Files:
5 edited

Legend:

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

    r10601 r10621  
    289289        if (error != null) {
    290290            if (showNotif) {
    291                 GuiHelper.runInEDT(
     291                GuiHelper.runInEDT(() ->
    292292                        new Notification(error)
    293293                        .setIcon(JOptionPane.INFORMATION_MESSAGE)
    294                         ::show);
     294                        .show());
    295295            }
    296296            return null;
  • trunk/src/org/openstreetmap/josm/data/AutosaveTask.java

    r10608 r10621  
    232232                changedDatasets.clear();
    233233                if (PROP_NOTIFICATION.get() && !layersInfo.isEmpty()) {
    234                     displayNotification();
     234                    GuiHelper.runInEDT(this::displayNotification);
    235235                }
    236236            } catch (RuntimeException t) {
     
    243243
    244244    protected void displayNotification() {
    245         GuiHelper.runInEDT(
    246                 new Notification(tr("Your work has been saved automatically."))
    247                 .setDuration(Notification.TIME_SHORT)
    248                 ::show);
     245        new Notification(tr("Your work has been saved automatically."))
     246        .setDuration(Notification.TIME_SHORT)
     247        .show();
    249248    }
    250249
  • trunk/src/org/openstreetmap/josm/data/projection/datum/SevenParameterDatum.java

    r8509 r10621  
    1313 * - scale
    1414 *
    15  * This method is described by EPSG as EPSG::9606.
     15 * This method is described by EPSG as EPSG:9606.
    1616 * Also known as Bursa-Wolf.
    1717 */
  • trunk/src/org/openstreetmap/josm/gui/io/DownloadPrimitivesWithReferrersTask.java

    r10616 r10621  
    138138        final Set<PrimitiveId> errs = mainTask.getMissingPrimitives();
    139139        if (errs != null && !errs.isEmpty())
    140             GuiHelper.runInEDTAndWait(reportProblemDialog(errs,
     140            GuiHelper.runInEDTAndWait(() -> reportProblemDialog(errs,
    141141                    trn("Object could not be downloaded", "Some objects could not be downloaded", errs.size()),
    142142                    trn("One object could not be downloaded.<br>",
     
    148148                    tr("missing objects:"),
    149149                    JOptionPane.ERROR_MESSAGE
    150                     )::showDialog);
     150                    ).showDialog());
    151151
    152152        // Warm about deleted primitives
     
    160160        }
    161161        if (!del.isEmpty())
    162             GuiHelper.runInEDTAndWait(reportProblemDialog(del,
     162            GuiHelper.runInEDTAndWait(() -> reportProblemDialog(del,
    163163                    trn("Object deleted", "Objects deleted", del.size()),
    164164                    trn(
     
    169169                    null,
    170170                    JOptionPane.WARNING_MESSAGE
    171             )::showDialog);
     171            ).showDialog());
    172172    }
    173173
  • trunk/src/org/openstreetmap/josm/io/NMEAImporter.java

    r10616 r10621  
    7575           .append("</html>");
    7676        if (success) {
    77             SwingUtilities.invokeLater(new Notification(
     77            SwingUtilities.invokeLater(() -> new Notification(
    7878                    "<h3>" + tr("NMEA import success:") + "</h3>" + msg.toString())
    7979                    .setIcon(JOptionPane.INFORMATION_MESSAGE)
    80                     ::show);
     80                    .show());
    8181        } else {
    8282            HelpAwareOptionPane.showMessageDialogInEDT(
Note: See TracChangeset for help on using the changeset viewer.