Changeset 12135 in josm


Ignore:
Timestamp:
2017-05-13T14:03:23+02:00 (7 years ago)
Author:
bastiK
Message:

fixed #13100 - NPE on launch (2)

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
2 edited

Legend:

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

    r12133 r12135  
    452452        monitor.indeterminateSubTask(tr("Loading plugins"));
    453453        PluginHandler.loadLatePlugins(splash, pluginsToLoad, monitor.createSubTaskMonitor(1, false));
    454         toolbar.refreshToolbarControl();
     454        GuiHelper.runInEDTAndWait(() -> toolbar.refreshToolbarControl());
    455455    }
    456456
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r11677 r12135  
    6969import org.openstreetmap.josm.data.imagery.ImageryLayerInfo;
    7070import org.openstreetmap.josm.gui.tagging.presets.TaggingPreset;
     71import org.openstreetmap.josm.gui.util.GuiHelper;
    7172import org.openstreetmap.josm.tools.GBC;
    7273import org.openstreetmap.josm.tools.ImageProvider;
     
    995996     */
    996997    public ToolbarPreferences() {
    997         control.setFloatable(false);
    998         control.setComponentPopupMenu(popupMenu);
     998        GuiHelper.runInEDTAndWait(() -> {
     999            control.setFloatable(false);
     1000            control.setComponentPopupMenu(popupMenu);
     1001        });
    9991002        Main.pref.addPreferenceChangeListener(e -> {
    10001003            if ("toolbar.visible".equals(e.getKey())) {
     
    11101113        if (toolbar == null) {
    11111114            Main.info(tr("Registered toolbar action without name: {0}",
    1112             action.getClass().getName()));
     1115                action.getClass().getName()));
    11131116        } else {
    11141117            Action r = regactions.get(toolbar);
    11151118            if (r != null) {
    11161119                Main.info(tr("Registered toolbar action {0} overwritten: {1} gets {2}",
    1117                 toolbar, r.getClass().getName(), action.getClass().getName()));
     1120                    toolbar, r.getClass().getName(), action.getClass().getName()));
    11181121            }
    11191122        }
Note: See TracChangeset for help on using the changeset viewer.