{"action":"opened","issue":{"url":"https://api.github.com/repos/heron-mc/heron-mc/issues/421","labels_url":"https://api.github.com/repos/heron-mc/heron-mc/issues/421/labels{/name}","comments_url":"https://api.github.com/repos/heron-mc/heron-mc/issues/421/comments","events_url":"https://api.github.com/repos/heron-mc/heron-mc/issues/421/events","html_url":"https://github.com/heron-mc/heron-mc/issues/421","id":75229693,"number":421,"title":"OLEditor - delete feature from WFS layer doesn't work","user":{"login":"fegyi001","id":4125222,"avatar_url":"https://avatars.githubusercontent.com/u/4125222?v=3","gravatar_id":"","url":"https://api.github.com/users/fegyi001","html_url":"https://github.com/fegyi001","followers_url":"https://api.github.com/users/fegyi001/followers","following_url":"https://api.github.com/users/fegyi001/following{/other_user}","gists_url":"https://api.github.com/users/fegyi001/gists{/gist_id}","starred_url":"https://api.github.com/users/fegyi001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fegyi001/subscriptions","organizations_url":"https://api.github.com/users/fegyi001/orgs","repos_url":"https://api.github.com/users/fegyi001/repos","events_url":"https://api.github.com/users/fegyi001/events{/privacy}","received_events_url":"https://api.github.com/users/fegyi001/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-11T13:49:04Z","updated_at":"2015-05-11T13:49:04Z","closed_at":null,"body":"I experienced the following: \r\nWhen editing a WFS layer with OLEditor everything works fine when adding or modifying geometries. When I try to delete, however, the element disappears from the browser, but not from the database. Therefore, when I refresh the page the \"deleted\" feature is back again.\r\n\r\nI found the solution for the problem. The following file has to be fixed: 'DeleteFeature.js' from ux/oleditor/ole/client/lib/Editor/Control folder. \r\n\r\nThis should be the new content of the \"deleteFeature()\" method:\r\n\r\n    deleteFeature: function () {\r\n        if (this.layer.selectedFeatures.length > 0) {\r\n\t\t\tfor(var i=0; i<this.layer.selectedFeatures.length; i++) {\r\n\t\t\t\tvar feature = this.layer.selectedFeatures[i];\r\n\t\t\t\tfeature.state = OpenLayers.State.DELETE;\r\n\t\t\t\tthis.layer.events.triggerEvent('afterfeaturemodified', {feature: feature});\r\n\t\t\t}\r\n\t\t\tthis.layer.destroyFeatures(this.layer.selectedFeatures);\r\n                        this.layer.events.triggerEvent('featureunselected');\r\n             }\r\n    }\r\n"}}