works for edges, but copying edges still slow. Nodes operations are now faster, since all changes are in one undo action and therefore invalidate() is called only once. Edges will be redone the same way