To lock to the current selection:
If Lock to Current Selection is checked when a view orientation change occurs, the ViewCube uses the selected objects to calculate the center of the view and zooms to the extents of the selected objects. When unchecked, the ViewCube uses the selected objects to calculate the center of the view and zooms to the extents of the model.