don't trigger save twice in update layers, set correctly the bbox.

fixes #1719