How to move pivot to center of an array object? I have copied the default cube with the array modifier.

I can rotate my camera around the center of the cubes by pressing "shift + c".

How can I set the pivot to the center of the cubes? I could do it by setting the 3D cursor in the center and then set origin to 3D curser, but how do I get the 3D cursor in the center? Do I have to calculate the position by hand and set the coordinated componentwise, or is there also a shortcut?
Here's one hackish way to do it, taking advantage of the fact that positioning the 3D cursor is not undo-able.


Apply the array modifier
Enter edit mode (Tab)
Select everything (A)
Press ShiftS> Cursor to selected
Exit edit mode (Tab)
Undo twice (CtrlZ)