Improved handling of setting of the depth of the UI.


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14418 16af8721-9629-0410-8352-f15c8da7e697