Changeset 28599 in osm for applications/editors/josm
- Timestamp:
- 2012-08-22T23:50:49+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPlugin.java ¶
r28547 r28599 44 44 // private Tag2LinkPreferenceSetting preferenceSetting; TODO 45 45 46 private SelectionPopupListener selectionPopupListener; 47 private MembershipPopupListener membershipPopupListener; 48 private PropertyPopupListener propertyPopupListener; 49 private RelationPopupListener relationPopupListener; 50 46 51 /** 47 52 * Initializes the plugin. … … 69 74 if (newFrame != null) { 70 75 // Initialize dialogs listeners only after the main frame is created 71 newFrame.selectionListDialog.addPopupMenuListener(new SelectionPopupListener(newFrame)); 72 newFrame.propertiesDialog.addMembershipPopupMenuListener(new MembershipPopupListener(newFrame)); 73 newFrame.propertiesDialog.addPropertyPopupMenuListener(new PropertyPopupListener(newFrame)); 74 newFrame.relationListDialog.addPopupMenuListener(new RelationPopupListener(newFrame)); 76 newFrame.selectionListDialog.addPopupMenuListener(selectionPopupListener = new SelectionPopupListener(newFrame)); 77 newFrame.propertiesDialog.addMembershipPopupMenuListener(membershipPopupListener = new MembershipPopupListener(newFrame)); 78 newFrame.propertiesDialog.addPropertyPopupMenuListener(propertyPopupListener = new PropertyPopupListener(newFrame)); 79 newFrame.relationListDialog.addPopupMenuListener(relationPopupListener = new RelationPopupListener(newFrame)); 80 } else if (oldFrame != null) { 81 // Remove listeners from previous frame to avoid memory leaks 82 if (oldFrame.selectionListDialog != null) { 83 oldFrame.selectionListDialog.removePopupMenuListener(selectionPopupListener); 84 } 85 if (oldFrame.propertiesDialog != null) { 86 oldFrame.propertiesDialog.removeMembershipPopupMenuListener(membershipPopupListener); 87 oldFrame.propertiesDialog.removePropertyPopupMenuListener(propertyPopupListener); 88 } 89 if (oldFrame.relationListDialog != null) { 90 oldFrame.relationListDialog.removePopupMenuListener(relationPopupListener); 91 } 92 selectionPopupListener = null; 93 membershipPopupListener = null; 94 propertyPopupListener = null; 95 relationPopupListener = null; 75 96 } 76 97 }
Note:
See TracChangeset
for help on using the changeset viewer.