Layer fields should be updated after changes in the data provider.
Merge pull request #168 from snorfalorpagus/updateFields

Layer fields should be updated after changes in the data provider.