Changeset 10804 in josm


Ignore:
Timestamp:
2016-08-15T14:28:24+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13350 - Copy&pasting an object is not considered a change (patch by michael2402, regression) - gsoc-core

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java

    r10467 r10804  
    101101                }
    102102            }
     103            newPrimitives.stream().forEach(p -> p.setModified(true));
    103104        } else { // redo
    104105            // When redoing this command, we have to add the same objects, otherwise
  • trunk/test/unit/org/openstreetmap/josm/command/AddPrimitivesCommandTest.java

    r10758 r10804  
    44import static org.junit.Assert.assertArrayEquals;
    55import static org.junit.Assert.assertEquals;
    6 import static org.junit.Assert.assertFalse;
    76import static org.junit.Assert.assertSame;
    87import static org.junit.Assert.assertTrue;
     
    218217        assertEquals(2, layer1.data.getNodes().size());
    219218        assertEquals(1, layer1.data.getWays().size());
    220         assertEquals(0, layer1.data.allModifiedPrimitives().size());
     219        assertEquals(3, layer1.data.allModifiedPrimitives().size());
    221220        for (OsmPrimitive n : layer1.data.allPrimitives()) {
    222221            assertEquals("test", n.get("test"));
    223             assertFalse(n.isModified());
     222            assertTrue(n.isModified());
    224223        }
    225224
Note: See TracChangeset for help on using the changeset viewer.