Implemented overlay selection in the viewer.