Changeset 13330 in josm for trunk/src/org
- Timestamp:
- 2018-01-15T22:52:26+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/bugreport/BugReportDialog.java
r12790 r13330 246 246 */ 247 247 private static Frame findParent() { 248 Component current = Main.parent; 249 try { 250 // avoid cycles/invalid hirarchies 251 for (int i = 0; i < 20 && current != null; i++) { 252 if (current instanceof Frame) { 253 return (Frame) current; 254 } 255 current = current.getParent(); 256 } 257 } catch (RuntimeException e) { // NOPMD 258 BugReport.intercept(e).put("current", current).warn(); 259 } 260 return null; 248 return (Frame) (Main.parent instanceof Frame ? Main.parent : SwingUtilities.getAncestorOfClass(Frame.class, Main.parent)); 261 249 } 262 250
Note:
See TracChangeset
for help on using the changeset viewer.