Changeset 1196 in josm for trunk/src/org
- Timestamp:
- 2008-12-31T12:35:50+01:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r1169 r1196 75 75 String fn = file.getName(); 76 76 if (ExtensionFileFilter.filters[ExtensionFileFilter.OSM].acceptName(fn)) { 77 DataSet dataSet = OsmReader.parseDataSet(new FileInputStream(file), null, Main.pleaseWaitDlg); 77 OsmReader osm = OsmReader.parseDataSetOsm(new FileInputStream(file), null, Main.pleaseWaitDlg); 78 DataSet dataSet = osm.getDs(); 78 79 OsmDataLayer layer = new OsmDataLayer(dataSet, file.getName(), file); 79 80 Main.main.addLayer(layer); 80 81 layer.fireDataChange(); 82 if (osm.getParseNotes().length() != 0) { 83 /* display at most five lines */ 84 String notes = osm.getParseNotes(); 85 int j = 0; 86 for (int i = 0; i < 5; i++) { 87 j = notes.indexOf('\n', j + 1); 88 } 89 JOptionPane.showMessageDialog(Main.parent, notes.substring(0, j)); 90 } 81 91 } 82 92 else -
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r1169 r1196 114 114 if (wayOccurenceCounter.isEmpty()) { 115 115 JOptionPane.showMessageDialog(Main.parent, 116 trn("The selected node is no inner part of any way.", 117 "The selected nodes are no inner part of any way.", selectedNodes.size())); 116 trn("The selected node is not in the middle of any way.", 117 "The selected nodes are not in the middle of any way.", 118 selectedNodes.size())); 118 119 return; 119 120 } -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r1195 r1196 345 345 } 346 346 } 347 Boolean isMultipolygon = "multipolygon".equals(r.keys.get("type")); 348 if (!drawMultipolygon || !isMultipolygon) 349 { 350 if(r.selected && !isMultipolygon) 347 if (!drawMultipolygon || !"multipolygon".equals(r.keys.get("type"))) 348 { 349 if(r.selected) 351 350 { 352 351 for (RelationMember m : r.members) -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r1195 r1196 60 60 */ 61 61 private DataSet ds = new DataSet(); 62 public DataSet getDs() { return ds; } 63 64 /** 65 * Record warnings. If there were any data inconsistencies, append 66 * a newline-terminated string. 67 */ 68 private String parseNotes = new String(); 69 public String getParseNotes() { 70 return parseNotes; 71 } 62 72 63 73 /** … … 333 343 Node n = findNode(id); 334 344 if (n == null) { 345 parseNotes += tr("Skipping a way because it includes a node that doesn't exist: {0}\n", id); 335 346 failed = true; 336 347 break; … … 435 446 */ 436 447 public static DataSet parseDataSet(InputStream source, DataSet ref, PleaseWaitDialog pleaseWaitDlg) throws SAXException, IOException { 448 return parseDataSetOsm(source, ref, pleaseWaitDlg).ds; 449 } 450 451 public static OsmReader parseDataSetOsm(InputStream source, DataSet ref, PleaseWaitDialog pleaseWaitDlg) throws SAXException, IOException { 437 452 OsmReader osm = new OsmReader(); 438 453 osm.references = ref == null ? new DataSet() : ref; … … 468 483 o.id = 0; 469 484 470 return osm .ds;485 return osm; 471 486 } 472 487 }
Note:
See TracChangeset
for help on using the changeset viewer.