Changeset 16048 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r15890 r16048 1534 1534 innerWays.retainAll(selectedWays); 1535 1535 1536 if (!innerWays.isEmpty() && selectedWays.contains(outerWay)) { 1537 // see #18744 1538 new Notification(tr("Cannot join inner and outer ways of a multipolygon")) 1539 .setIcon(JOptionPane.INFORMATION_MESSAGE) 1540 .show(); 1541 return null; 1542 } 1543 1536 1544 if (processedOuterWays.contains(outerWay)) { 1537 1545 new Notification( -
trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java
r16006 r16048 146 146 147 147 /** 148 * Non-regression test for bug #18744. 149 * @throws IOException if any I/O error occurs 150 * @throws IllegalDataException if OSM parsing fails 151 */ 152 @Test 153 public void testTicket18744() throws IOException, IllegalDataException { 154 try (InputStream is = TestUtils.getRegressionDataStream(18744, "18744-sample.osm")) { 155 DataSet ds = OsmReader.parseDataSet(is, null); 156 Layer layer = new OsmDataLayer(ds, null, null); 157 MainApplication.getLayerManager().addLayer(layer); 158 try { 159 assertEquals(3, ds.getWays().size()); 160 new JoinAreasAction(false).join(ds.getWays()); 161 // join should not have changed anything 162 assertEquals(3, ds.getWays().size()); 163 } finally { 164 // Ensure we clean the place before leaving, even if test fails. 165 MainApplication.getLayerManager().removeLayer(layer); 166 } 167 } 168 } 169 170 171 /** 148 172 * Non-regression test which checks example files in nodist/data 149 173 * @throws Exception if an error occurs
Note:
See TracChangeset
for help on using the changeset viewer.