- Timestamp:
- 2017-12-18T15:03:48+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java
r12973 r13223 8 8 import java.util.concurrent.CopyOnWriteArrayList; 9 9 import java.util.stream.Stream; 10 11 import javax.swing.SwingUtilities;12 10 13 11 import org.openstreetmap.josm.data.SelectionChangedListener; … … 20 18 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; 21 19 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; 20 import org.openstreetmap.josm.gui.util.GuiHelper; 22 21 import org.openstreetmap.josm.tools.bugreport.BugReport; 22 import org.openstreetmap.josm.tools.bugreport.ReportedException; 23 23 24 24 /** … … 72 72 return Objects.equals(listener, that.listener); 73 73 } 74 75 @Override 76 public String toString() { 77 return "OldListenerInfo [listener=" + listener + ']'; 78 } 74 79 } 75 80 … … 97 102 DataListenerInfo that = (DataListenerInfo) o; 98 103 return Objects.equals(listener, that.listener); 104 } 105 106 @Override 107 public String toString() { 108 return "DataListenerInfo [listener=" + listener + ']'; 99 109 } 100 110 } … … 196 206 public void selectionChanged(SelectionChangeEvent event) { 197 207 fireEvent(immedatelyListeners, event); 198 SwingUtilities.invokeLater(() -> fireEvent(inEDTListeners, event)); 208 try { 209 GuiHelper.runInEDTAndWaitWithException(() -> fireEvent(inEDTListeners, event)); 210 } catch (ReportedException e) { 211 throw BugReport.intercept(e).put("event", event).put("inEDTListeners", inEDTListeners); 212 } 199 213 } 200 214
Note:
See TracChangeset
for help on using the changeset viewer.