diff --git a/lib/OpenLayers/Control/ModifyFeature.js b/lib/OpenLayers/Control/ModifyFeature.js index 31d968cbb5..3982cb1c9b 100644 --- a/lib/OpenLayers/Control/ModifyFeature.js +++ b/lib/OpenLayers/Control/ModifyFeature.js @@ -633,6 +633,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { this.layer.drawFeature(this.feature, this.standalone ? undefined : this.selectControl.renderIntent); + this.modified = true; this.resetVertices(); this.setFeatureState(); this.onModification(this.feature); diff --git a/tests/Control/ModifyFeature.html b/tests/Control/ModifyFeature.html index 940e1b7799..21682c665f 100644 --- a/tests/Control/ModifyFeature.html +++ b/tests/Control/ModifyFeature.html @@ -74,7 +74,7 @@ } function test_handleKeypress(t) { - t.plan(14); + t.plan(16); /** * There are two things that we want to test here @@ -101,6 +101,8 @@ // mock up vertex deletion control.dragControl.feature = point; control.feature = poly; + // we cannot use selectFeature since the control is not part of a map + control._originalGeometry = poly.geometry.clone(); control.vertices = [point]; point.geometry.parent = { removeComponent: function(geometry) { @@ -110,6 +112,7 @@ }; layer.events.on({ "featuremodified": function(event) { + t.ok(event.feature.modified !== null, "modified property of feature should have been set"); t.eq(event.feature.id, poly.id, "vertex deletion: featuremodifed triggered"); }, "vertexremoved": function(evt) {