Bugfix curve

1. Creation of relations run before moving grids.
1. Position of grids is measured and cached when relation is created.
1. Redraw curves of relations when grids moves, but cached position of grids is used.