Changeset 10400 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2016-06-16T15:49:07+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
r10396 r10400 15 15 import org.openstreetmap.josm.gui.layer.Layer; 16 16 import org.openstreetmap.josm.gui.preferences.ToolbarPreferences; 17 import org.openstreetmap.josm.gui.util.GuiHelper; 17 18 import org.openstreetmap.josm.io.CertificateAmendment; 18 19 import org.openstreetmap.josm.io.OsmApi; … … 115 116 116 117 if (createGui) { 117 if (Main.toolbar == null) { 118 Main.toolbar = new ToolbarPreferences(); 119 } 120 if (Main.main == null) { 121 new MainApplication().initialize(); 122 } 123 if (Main.map == null) { 124 Main.main.createMapFrame(null, null); 125 } else { 126 for (Layer l: Main.getLayerManager().getLayers()) { 127 Main.getLayerManager().removeLayer(l); 118 GuiHelper.runInEDTAndWaitWithException(new Runnable() { 119 @Override 120 public void run() { 121 setupGUI(); 128 122 } 123 }); 124 } 125 } 126 127 private void setupGUI() { 128 if (Main.toolbar == null) { 129 Main.toolbar = new ToolbarPreferences(); 130 } 131 if (Main.main == null) { 132 new MainApplication().initialize(); 133 } 134 if (Main.map == null) { 135 Main.main.createMapFrame(null, null); 136 } else { 137 for (Layer l: Main.getLayerManager().getLayers()) { 138 Main.getLayerManager().removeLayer(l); 129 139 } 130 140 }
Note:
See TracChangeset
for help on using the changeset viewer.