diff --git a/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java b/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java
index c3a9ab7..02b73dd 100644
a
|
b
|
public class AddPrimitivesCommand extends Command {
|
100 | 100 | newPrimitives.get(i).load(data.get(i)); |
101 | 101 | } |
102 | 102 | } |
| 103 | newPrimitives.stream().forEach(p -> p.setModified(true)); |
103 | 104 | } else { // redo |
104 | 105 | // When redoing this command, we have to add the same objects, otherwise |
105 | 106 | // a subsequent command (e.g. MoveCommand) cannot be redone. |
diff --git a/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java b/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java
index bb9448e..cde24a9 100644
a
|
b
|
package org.openstreetmap.josm.command;
|
3 | 3 | |
4 | 4 | import static org.junit.Assert.assertArrayEquals; |
5 | 5 | import static org.junit.Assert.assertEquals; |
6 | | import static org.junit.Assert.assertFalse; |
7 | 6 | import static org.junit.Assert.assertSame; |
8 | 7 | import static org.junit.Assert.assertTrue; |
9 | 8 | |
… |
… |
public class AddPrimitivesCommandTest {
|
217 | 216 | assertEquals(3, layer1.data.allPrimitives().size()); |
218 | 217 | assertEquals(2, layer1.data.getNodes().size()); |
219 | 218 | assertEquals(1, layer1.data.getWays().size()); |
220 | | assertEquals(0, layer1.data.allModifiedPrimitives().size()); |
| 219 | assertEquals(3, layer1.data.allModifiedPrimitives().size()); |
221 | 220 | for (OsmPrimitive n : layer1.data.allPrimitives()) { |
222 | 221 | assertEquals("test", n.get("test")); |
223 | | assertFalse(n.isModified()); |
| 222 | assertTrue(n.isModified()); |
224 | 223 | } |
225 | 224 | |
226 | 225 | for (Node n : layer1.data.getNodes()) { |