- Timestamp:
- 2024-02-01T13:56:33+01:00 (10 months ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/dialogs/relation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
r18804 r18967 157 157 private final CancelAction cancelAction; 158 158 /** 159 * Action for performing the {@link DeleteCurrentRelationAction} 160 */ 161 private final DeleteCurrentRelationAction deleteAction; 162 /** 159 163 * A list of listeners that need to be notified on clipboard content changes. 160 164 */ … … 266 270 final DuplicateRelationAction duplicateAction = new DuplicateRelationAction(actionAccess); 267 271 // Action for performing the {@link DeleteCurrentRelationAction} 268 final DeleteCurrentRelationActiondeleteAction = new DeleteCurrentRelationAction(actionAccess);272 deleteAction = new DeleteCurrentRelationAction(actionAccess); 269 273 270 274 this.memberTableModel.addTableModelListener(applyAction); … … 406 410 * builds the panel with the OK and the Cancel button 407 411 * @param okAction OK action 412 * @param deleteAction Delete action 408 413 * @param cancelAction Cancel action 409 414 * … … 1077 1082 @Override 1078 1083 public void commandChanged(int queueSize, int redoSize) { 1084 deleteAction.updateEnabledState(); 1079 1085 Relation r = getRelation(); 1080 1086 if (r != null && r.getDataSet() == null) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DeleteCurrentRelationAction.java
r14030 r18967 40 40 41 41 @Override 42 protected void updateEnabledState() { 43 setEnabled(getEditor().getRelationSnapshot() != null); 42 public void updateEnabledState() { 43 Relation r = getEditor().getRelation(); 44 setEnabled(r != null && !r.isDeleted()); 44 45 } 45 46
Note:
See TracChangeset
for help on using the changeset viewer.