deleting a vertex does not set feature.modified, this is a regression since in OL 2.10 a WFS transaction would include all fields, but 2.11 is smarter in the sense that it filters out fields that have not changed in the Transaction XML, which in this case, i.e. deleting a vertex, results in no geometry in the WFS transaction, r=tschaub (pullup #3463)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12248 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2011-08-15 16:26:34 +00:00
parent 652f2729cd
commit c587865bb1
2 changed files with 5 additions and 1 deletions

View File

@@ -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);

View File

@@ -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) {