Ticket #3377: 1_less_warning_utils.patch
| File 1_less_warning_utils.patch, 2.8 KB (added by , 16 years ago) |
|---|
-
src/UtilsPlugin/JumpToAction.java
19 19 import org.openstreetmap.josm.Main; 20 20 import org.openstreetmap.josm.actions.JosmAction; 21 21 import org.openstreetmap.josm.data.Bounds; 22 import org.openstreetmap.josm.data.ProjectionBounds;23 22 import org.openstreetmap.josm.data.coor.LatLon; 24 23 import org.openstreetmap.josm.gui.MapView; 25 24 import org.openstreetmap.josm.tools.GBC; -
src/UtilsPlugin/JoinAreasAction.java
106 106 * Checks whether the selected objects are suitable to join and joins them if so 107 107 */ 108 108 public void actionPerformed(ActionEvent e) { 109 int result = new ExtendedDialog(Main.parent,110 tr("Enter values for all conflicts."),111 new JLabel(tr("THIS IS EXPERIMENTAL. Save your work and verify before uploading.")),112 new String[] {tr("Continue anyway"), tr("Cancel")},113 new String[] {"joinareas.png", "cancel.png"}).getValue();114 if(result != 1) return;115 116 109 Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelectedWays(); 117 110 118 111 int ways = 0; … … 298 291 if (components.isEmpty()) 299 292 return false; // No conflicts found 300 293 301 int result = new ExtendedDialog(Main.parent, 302 tr("Enter values for all conflicts."), 303 p, 304 new String[] {tr("Solve Conflicts"), tr("Cancel")}, 305 new String[] {"dialogs/conflict.png", "cancel.png"}).getValue(); 294 ExtendedDialog ed = new ExtendedDialog(Main.parent, 295 tr("Enter values for all conflicts."), 296 new String[] {tr("Solve Conflicts"), tr("Cancel")}); 297 ed.setButtonIcons(new String[] {"dialogs/conflict.png", "cancel.png"}); 298 ed.setContent(p); 299 ed.showDialog(); 306 300 307 if ( result!= 1) return true; // user cancel, unresolvable conflicts301 if (ed.getValue() != 1) return true; // user cancel, unresolvable conflicts 308 302 309 303 for (Entry<String, JComboBox> e : components.entrySet()) { 310 304 String val = e.getValue().getEditor().getItem().toString(); … … 448 442 private ArrayList<RelationRole> removeFromRelations(OsmPrimitive osm) { 449 443 ArrayList<RelationRole> result = new ArrayList<RelationRole>(); 450 444 for (Relation r : Main.main.getCurrentDataSet().relations) { 451 if (r. deleted|| r.incomplete) continue;445 if (r.isDeleted() || r.incomplete) continue; 452 446 for (RelationMember rm : r.members) { 453 447 if (rm.member != osm) continue; 454 448
