- Timestamp:
- 2024-02-02T15:25:09+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
r18967 r18968 157 157 private final CancelAction cancelAction; 158 158 /** 159 * Action for performing the {@link DeleteCurrentRelationAction}160 */161 private final DeleteCurrentRelationAction deleteAction;162 /**163 159 * A list of listeners that need to be notified on clipboard content changes. 164 160 */ … … 270 266 final DuplicateRelationAction duplicateAction = new DuplicateRelationAction(actionAccess); 271 267 // Action for performing the {@link DeleteCurrentRelationAction} 272 deleteAction = new DeleteCurrentRelationAction(actionAccess);268 final DeleteCurrentRelationAction deleteAction = new DeleteCurrentRelationAction(actionAccess); 273 269 274 270 this.memberTableModel.addTableModelListener(applyAction); … … 410 406 * builds the panel with the OK and the Cancel button 411 407 * @param okAction OK action 412 * @param deleteAction Delete action413 408 * @param cancelAction Cancel action 414 409 * … … 1082 1077 @Override 1083 1078 public void commandChanged(int queueSize, int redoSize) { 1084 deleteAction.updateEnabledState();1085 1079 Relation r = getRelation(); 1086 1080 if (r != null && r.getDataSet() == null) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/DeleteCurrentRelationAction.java
r18967 r18968 9 9 import org.openstreetmap.josm.actions.mapmode.DeleteAction; 10 10 import org.openstreetmap.josm.data.osm.Relation; 11 import org.openstreetmap.josm.gui.MainApplication; 11 12 import org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor; 13 import org.openstreetmap.josm.gui.dialogs.relation.RelationDialogManager; 14 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 12 15 import org.openstreetmap.josm.tools.ImageProvider; 13 16 … … 36 39 if (toDelete == null) 37 40 return; 41 if (toDelete.isDeleted()) { 42 // see #23447 43 OsmDataLayer layer = MainApplication.getLayerManager().getEditLayer(); 44 if (layer != null) { 45 RelationDialogManager.getRelationDialogManager().close(layer, toDelete); 46 } 47 return; 48 } 38 49 DeleteAction.deleteRelation(getLayer(), toDelete); 39 50 } 40 51 41 52 @Override 42 public void updateEnabledState() { 43 Relation r = getEditor().getRelation(); 44 setEnabled(r != null && !r.isDeleted()); 53 protected void updateEnabledState() { 54 setEnabled(getEditor().getRelationSnapshot() != null); 45 55 } 46 56
Note:
See TracChangeset
for help on using the changeset viewer.