Changeset 9657 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CancelAction.java
- Timestamp:
- 2016-01-27T22:18:36+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/actions/CancelAction.java
r9512 r9657 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.Component;7 6 import java.awt.event.ActionEvent; 8 7 … … 66 65 //copied from OKAction.run() 67 66 Main.pref.put("relation.editor.generic.lastrole", tfRole.getText()); 68 if (editor.getRelation() == null) { 69 applyNewRelation(tagModel); 70 } else if (!memberTableModel.hasSameMembersAs(snapshot) || tagModel.isDirty()) { 71 if (editor.isDirtyRelation()) { 72 if (confirmClosingBecauseOfDirtyState()) { 73 if (layer.getConflicts().hasConflictForMy(editor.getRelation())) { 74 warnDoubleConflict(); 75 return; 76 } 77 applyExistingConflictingRelation(tagModel); 78 } else 79 return; 80 } else { 81 applyExistingNonConflictingRelation(tagModel); 82 } 83 } 67 if (!applyChanges()) 68 return; 84 69 } else if (ret == 2 || ret == JOptionPane.CLOSED_OPTION) //Cancel, continue editing 85 70 return; 86 71 //in case of "No, discard", there is no extra action to be performed here. 87 72 } 88 if (editor instanceof Component) { 89 ((Component) editor).setVisible(false); 90 } 73 hideEditor(); 91 74 } 92 75
Note:
See TracChangeset
for help on using the changeset viewer.