Changeset 11208 in josm for trunk/src/org


Ignore:
Timestamp:
2016-11-01T20:14:19+01:00 (8 years ago)
Author:
simon04
Message:

fix #13899 - EDT violation in SaveLayersDialog via PluginHandler

File:
1 edited

Legend:

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

    r11106 r11208  
    8989import org.openstreetmap.josm.gui.progress.ProgressMonitorExecutor;
    9090import org.openstreetmap.josm.gui.tagging.presets.TaggingPresets;
     91import org.openstreetmap.josm.gui.util.GuiHelper;
    9192import org.openstreetmap.josm.gui.util.RedirectInputMap;
    9293import org.openstreetmap.josm.io.FileWatcher;
     
    804805     */
    805806    public static boolean exitJosm(boolean exit, int exitCode, SaveLayersDialog.Reason reason) {
    806         if (SaveLayersDialog.saveUnsavedModifications(getLayerManager().getLayers(), reason != null ? reason : SaveLayersDialog.Reason.EXIT)) {
     807        final boolean proceed = Boolean.TRUE.equals(GuiHelper.runInEDTAndWaitAndReturn(() ->
     808                SaveLayersDialog.saveUnsavedModifications(getLayerManager().getLayers(), reason != null ? reason : SaveLayersDialog.Reason.EXIT)));
     809        if (proceed) {
    807810            if (Main.main != null) {
    808811                Main.main.shutdown();
Note: See TracChangeset for help on using the changeset viewer.