Changeset 14548 in josm for trunk/src/org
- Timestamp:
- 2018-12-10T17:04:09+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ImageryMenu.java
r14248 r14548 154 154 savedLayers.sort(alphabeticImageryComparator); 155 155 for (final ImageryInfo u : savedLayers) { 156 addDynamic( new AddImageryLayerAction(u));156 addDynamic(trackJosmAction(new AddImageryLayerAction(u))); 157 157 } 158 158 … … 189 189 addDynamicSeparator(); 190 190 for (ImageryInfo i : inViewLayers) { 191 addDynamic( new AddImageryLayerAction(i));191 addDynamic(trackJosmAction(new AddImageryLayerAction(i))); 192 192 } 193 193 } … … 262 262 */ 263 263 private final List<Object> dynamicItems = new ArrayList<>(20); 264 private final List<JosmAction> dynJosmActions = new ArrayList<>(20); 264 265 265 266 /** … … 268 269 */ 269 270 private void removeDynamicItems() { 271 dynJosmActions.forEach(JosmAction::destroy); 272 dynJosmActions.clear(); 270 273 for (Object item : dynamicItems) { 271 274 if (item instanceof JMenuItem) { … … 294 297 dynamicItems.add(this.add(it)); 295 298 } 299 300 private Action trackJosmAction(Action action) { 301 if (action instanceof JosmAction) { 302 dynJosmActions.add((JosmAction) action); 303 } 304 return action; 305 } 306 296 307 }
Note:
See TracChangeset
for help on using the changeset viewer.