geoext/geoext2 — pull request #196 by marcjansen (2013-10-11 07:56:26+00:00)
Title: FeatureStore: Use store.add() not loadRawData() onFeatureAdded.

A FeatureStore and an associated layer can easily get out of sync. If one enters

```js
mapPanel.map.layers[1].addFeatures([
new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Point(5,45)
)
]);
```

in the `grid/feature-grid.html` example, the layer would afterwards only have one feature, but the store would still
have the initial 10 records. Adding a record manually (e.g. with `store.add()`) will also show the wrong
behaviour.

This PR adds new tests that make this behaviour reproducible and fixes the error by using `store.add()` instead of `store.loadRawData()` in the `onFeaturesAdded`-listener. It also fixes issue #154.

Tests pass for me in FF 24 and Chrome 27.

Please review.