Changeset 1397 in josm for trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
- Timestamp:
- 2009-02-14T12:25:54+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r1169 r1397 38 38 import org.openstreetmap.josm.data.osm.TigerUtils; 39 39 import org.openstreetmap.josm.data.osm.Way; 40 import org.openstreetmap.josm.gui.ExtendedDialog; 40 41 import org.openstreetmap.josm.tools.GBC; 41 42 import org.openstreetmap.josm.tools.Pair; … … 108 109 for (HashSet<Way> waylinks : backlinks.values()) { 109 110 if (!waylinks.containsAll(selectedWays)) { 110 int option = JOptionPane.showConfirmDialog(Main.parent, 111 tr("The selected ways have differing relation memberships. " 112 + "Do you still want to combine them?"), 113 tr("Combine ways with different memberships?"), 114 JOptionPane.YES_NO_OPTION); 115 if (option == JOptionPane.YES_OPTION) 116 break; 111 int option = new ExtendedDialog(Main.parent, 112 tr("Combine ways with different memberships?"), 113 tr("The selected ways have differing relation memberships. " 114 + "Do you still want to combine them?"), 115 new String[] {tr("Combine Anyway"), tr("Cancel")}, 116 new String[] {"combineway.png", "cancel.png"}).getValue(); 117 if (option == 1) break; 118 117 119 return; 118 120 } … … 136 138 Object secondTry = actuallyCombineWays(selectedWays, true); 137 139 if (secondTry instanceof List) { 138 int option = JOptionPane.showConfirmDialog(Main.parent, 140 int option = new ExtendedDialog(Main.parent, 141 tr("Change directions?"), 139 142 tr("The ways can not be combined in their current directions. " 140 + "Do you want to reverse some of them?"), tr("Change directions?"), 141 JOptionPane.YES_NO_OPTION); 142 if (option != JOptionPane.YES_OPTION) { 143 return; 144 } 143 + "Do you want to reverse some of them?"), 144 new String[] {tr("Reverse and Combine"), tr("Cancel")}, 145 new String[] {"wayflip.png", "cancel.png"}).getValue(); 146 if (option != 1) return; 145 147 nodeList = (List<Node>) secondTry; 146 148 } else { … … 191 193 192 194 if (!components.isEmpty()) { 193 int answer = JOptionPane.showConfirmDialog(Main.parent, p, tr("Enter values for all conflicts."), JOptionPane.OK_CANCEL_OPTION); 194 if (answer != JOptionPane.OK_OPTION) 195 return; 195 int answer = new ExtendedDialog(Main.parent, 196 tr("Enter values for all conflicts."), 197 p, 198 new String[] {tr("Solve Conflicts"), tr("Cancel")}, 199 new String[] {"dialogs/conflict.png", "cancel.png"}).getValue(); 200 if (answer != 1) return; 201 196 202 for (Entry<String, JComboBox> e : components.entrySet()) 197 203 newWay.put(e.getKey(), e.getValue().getEditor().getItem().toString());
Note:
See TracChangeset
for help on using the changeset viewer.