Ignore:
Timestamp:
2016-06-20T00:06:54+02:00 (9 years ago)
Author:
Don-vip
Message:

fix #13001 - Add MainPanel + some new methods (patch by michael2402, modified) - gsoc-core

File:
1 edited

Legend:

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

    r10364 r10432  
    1414import org.openstreetmap.josm.gui.layer.NoteLayer;
    1515import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    16 import org.openstreetmap.josm.gui.util.GuiHelper;
    1716import org.xml.sax.SAXException;
    1817
     
    3837        try (InputStream is = Compression.getUncompressedFileInputStream(file)) {
    3938            final NoteLayer layer = loadLayer(is, file, file.getName(), progressMonitor);
    40             if (Main.map == null || !Main.getLayerManager().containsLayer(layer)) {
    41                 GuiHelper.runInEDT(new Runnable() {
    42                     @Override
    43                     public void run() {
    44                         Main.main.addLayer(layer);
    45                     }
    46                 });
     39            if (!Main.getLayerManager().containsLayer(layer)) {
     40                Main.getLayerManager().addLayer(layer);
    4741            }
    4842        } catch (SAXException e) {
Note: See TracChangeset for help on using the changeset viewer.