- Timestamp:
- 2018-12-25T21:17:28+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
r14106 r14601 43 43 private final PreferenceTabbedPane tpPreferences = new PreferenceTabbedPane(); 44 44 private final ContextSensitiveHelpAction helpAction = new ContextSensitiveHelpAction(); 45 private final WindowEventHandler windowEventHandler = new WindowEventHandler(); 45 46 private boolean canceled; 46 47 … … 84 85 tpPreferences.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); 85 86 c.add(buildActionPanel(), BorderLayout.SOUTH); 86 87 addWindowListener(new WindowEventHandler()); 87 addWindowListener(windowEventHandler); 88 88 89 89 InputMapUtils.addEscapeAction(getRootPane(), new CancelAction()); … … 177 177 public void cancel() { 178 178 setCanceled(true); 179 setVisible(false); 180 tpPreferences.validationListeners.clear(); 179 dispose(); 181 180 } 182 181 … … 202 201 203 202 tpPreferences.savePreferences(); 204 tpPreferences.validationListeners.clear();205 203 setCanceled(false); 206 setVisible(false);204 dispose(); 207 205 } 208 206 } … … 214 212 } 215 213 } 214 215 @Override 216 public void dispose() { 217 removeWindowListener(windowEventHandler); 218 super.dispose(); 219 } 216 220 }
Note:
See TracChangeset
for help on using the changeset viewer.