Changeset 10958 in josm
- Timestamp:
- 2016-09-04T17:27:29+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
r10957 r10958 36 36 37 37 private final ApplyResolutionAction applyResolutionAction = new ApplyResolutionAction(); 38 39 private boolean isRegistered; 38 40 39 41 /** … … 65 67 } 66 68 67 private void registerListeners() { 68 resolver.addPropertyChangeListener(applyResolutionAction); 69 resolver.registerListeners(); 70 } 71 72 private void unregisterListeners() { 73 resolver.removePropertyChangeListener(applyResolutionAction); 74 resolver.unregisterListeners(); 69 private synchronized void registerListeners() { 70 if (!isRegistered) { 71 resolver.addPropertyChangeListener(applyResolutionAction); 72 resolver.registerListeners(); 73 isRegistered = true; 74 } 75 } 76 77 private synchronized void unregisterListeners() { 78 // See #13479 - See https://bugs.openjdk.java.net/browse/JDK-4387314 79 // Owner window keep a list of owned windows, and does not remove the references when the child is disposed. 80 // There's no easy way to remove ourselves from this list, so we must keep track of register state 81 if (isRegistered) { 82 resolver.removePropertyChangeListener(applyResolutionAction); 83 resolver.unregisterListeners(); 84 isRegistered = false; 85 } 75 86 } 76 87
Note:
See TracChangeset
for help on using the changeset viewer.