Changeset 5796 in josm


Ignore:
Timestamp:
2013-03-22T22:44:52+01:00 (7 years ago)
Author:
Don-vip
Message:

fix #8533 - AWT dead lock when hiding splash screen and opening main window (patch by kendzi)

File:
1 edited

Legend:

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

    r5605 r5796  
    4141import org.openstreetmap.josm.gui.preferences.server.OAuthAccessTokenHolder;
    4242import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     43import org.openstreetmap.josm.gui.util.GuiHelper;
    4344import org.openstreetmap.josm.io.DefaultProxySelector;
    4445import org.openstreetmap.josm.io.auth.CredentialsManager;
     
    280281        Main.pref.updateSystemProperties();
    281282
    282         JFrame mainFrame = new JFrame(tr("Java OpenStreetMap Editor"));
     283        final JFrame mainFrame = new JFrame(tr("Java OpenStreetMap Editor"));
    283284        Main.parent = mainFrame;
    284285
     
    314315        }
    315316
    316         SplashScreen splash = new SplashScreen();
     317        final SplashScreen splash = new SplashScreen();
    317318        final ProgressMonitor monitor = splash.getProgressMonitor();
    318319        monitor.beginTask(tr("Initializing"));
     
    348349        PluginHandler.loadLatePlugins(splash,pluginsToLoad,  monitor.createSubTaskMonitor(1, false));
    349350        toolbar.refreshToolbarControl();
    350         splash.setVisible(false);
    351         splash.dispose();
    352         mainFrame.setVisible(true);
     351
     352        GuiHelper.runInEDT(new Runnable() {
     353            public void run() {
     354                splash.setVisible(false);
     355                splash.dispose();
     356                mainFrame.setVisible(true);
     357            }
     358        });
     359
    353360        Main.MasterWindowListener.setup();
    354361
Note: See TracChangeset for help on using the changeset viewer.