Changeset 16395 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2020-05-10T08:12:49+02:00 (5 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/history
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowser.java
r14463 r16395 6 6 import java.awt.BorderLayout; 7 7 import java.awt.Dimension; 8 import java.util.Arrays; 8 9 9 10 import javax.swing.JPanel; … … 152 153 @Override 153 154 public void destroy() { 154 model.unlinkAsListener(); 155 for (Destroyable component : new Destroyable[] { 156 tagInfoViewer, nodeListViewer, relationMemberListViewer, coordinateInfoViewer}) { 157 component.destroy(); 155 if (model != null) { 156 model.unlinkAsListener(); 157 model = null; 158 158 } 159 Arrays.asList(tagInfoViewer, nodeListViewer, relationMemberListViewer, coordinateInfoViewer).stream() 160 .filter(Destroyable.class::isInstance).forEach(Destroyable::destroy); 161 tagInfoViewer = null; 162 nodeListViewer = null; 163 relationMemberListViewer = null; 164 coordinateInfoViewer = null; 159 165 } 160 166 } -
trunk/src/org/openstreetmap/josm/gui/history/VersionTable.java
r14676 r16395 255 255 @Override 256 256 public void destroy() { 257 if (changesetInfoAction != null) 257 if (changesetInfoAction != null) { 258 258 changesetInfoAction.destroy(); 259 if (userInfoAction != null) 259 changesetInfoAction = null; 260 } 261 if (userInfoAction != null) { 260 262 userInfoAction.destroy(); 263 userInfoAction = null; 264 } 261 265 } 262 266 }
Note:
See TracChangeset
for help on using the changeset viewer.