Changeset 13827 in josm
- Timestamp:
- 2018-05-24T23:05:08+02:00 (7 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/SyncEditorLayerIndex.groovy
r13801 r13827 346 346 shapes += sep + "</shape>\n" 347 347 } 348 } catch(IllegalArgumentException) { 348 } catch(IllegalArgumentException ignored) { 349 349 } 350 350 if(shapes) { -
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r13825 r13827 191 191 formats.setToolTipText(tr("Select image format for WMS layer")); 192 192 193 if (!GraphicsEnvironment.isHeadless() ) {194 if (1 != new ExtendedDialog(Main.parent, tr("Select WMS layers"), tr("Add layers"), tr("Cancel")) { {193 if (!GraphicsEnvironment.isHeadless() && 194 1 != new ExtendedDialog(Main.parent, tr("Select WMS layers"), tr("Add layers"), tr("Cancel")) { { 195 195 final JScrollPane scrollPane = new JScrollPane(tree.getLayerTree()); 196 196 scrollPane.setPreferredSize(new Dimension(400, 400)); … … 199 199 panel.add(formats, GBC.eol().fill(GBC.HORIZONTAL)); 200 200 setContent(panel); 201 } }.showDialog().getValue()) { 202 return null; 203 } 201 } }.showDialog().getValue()) { 202 return null; 204 203 } 205 204 -
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r13824 r13827 466 466 } 467 467 if (tagEquals(QN_LAYER, reader.getName())) { 468 469 468 parseLayer(reader, ret); 470 469 } 471 if (tagEquals(QN_EX_GEOGRAPHIC_BBOX, reader.getName())) { 472 if (ret.getBounds() == null) { 473 Bounds bbox = parseExGeographic(reader); 474 ret.setBounds(bbox); 475 } 476 470 if (tagEquals(QN_EX_GEOGRAPHIC_BBOX, reader.getName()) && ret.getBounds() == null) { 471 ret.setBounds(parseExGeographic(reader)); 477 472 } 478 473 if (tagEquals(QN_BOUNDINGBOX, reader.getName())) { … … 484 479 } 485 480 if (ret.getBounds() == null && conv != null) { 486 Bounds bbox = parseBoundingBox(reader, conv); 487 ret.setBounds(bbox); 481 ret.setBounds(parseBoundingBox(reader, conv)); 488 482 } 489 483 } 490 if (tagEquals(QN_LATLONBOUNDINGBOX, reader.getName()) && belowWMS130()) { 491 if (ret.getBounds() == null) { 492 Bounds bbox = parseBoundingBox(reader, null); 493 ret.setBounds(bbox); 494 } 484 if (tagEquals(QN_LATLONBOUNDINGBOX, reader.getName()) && belowWMS130() && ret.getBounds() == null) { 485 ret.setBounds(parseBoundingBox(reader, null)); 495 486 } 496 487 } -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
r12846 r13827 94 94 protected void validateRequest() throws RequestHandlerBadRequestException { 95 95 allCoordinates.clear(); 96 for (String coordinatesString : (args != null ? args.get("way") : "").split(";\\s*")) {96 for (String coordinatesString : splitArg("way", SPLITTER_SEMIC)) { 97 97 String[] coordinates = coordinatesString.split(",\\s*", 2); 98 98 if (coordinates.length < 2) { -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadObjectHandler.java
r12636 r13827 98 98 protected void validateRequest() throws RequestHandlerBadRequestException { 99 99 ps.clear(); 100 for (String i : (args != null ? args.get("objects") : "").split(",\\s*")) {100 for (String i : splitArg("objects", SPLITTER_COMMA)) { 101 101 if (!i.isEmpty()) { 102 102 try { -
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandler.java
r13245 r13827 14 14 import java.util.Map; 15 15 import java.util.Set; 16 import java.util.regex.Pattern; 16 17 17 18 import javax.swing.JLabel; … … 36 37 public static final String loadInNewLayerKey = "remotecontrol.new-layer"; 37 38 public static final boolean loadInNewLayerDefault = false; 39 40 protected static final Pattern SPLITTER_COMMA = Pattern.compile(",\\s*"); 41 protected static final Pattern SPLITTER_SEMIC = Pattern.compile(";\\s*"); 38 42 39 43 /** past confirmations */ … … 215 219 protected void parseArgs() throws URISyntaxException { 216 220 this.args = getRequestParameter(new URI(this.request)); 221 } 222 223 protected final String[] splitArg(String arg, Pattern splitter) { 224 return splitter.split(args != null ? args.get(arg) : ""); 217 225 } 218 226
Note:
See TracChangeset
for help on using the changeset viewer.