Changeset 10489

Show
Ignore:
Timestamp:
07/16/09 14:04:35 (5 years ago)
Author:
robert
Message:

From Stephan Lamoliatte, "The vertical anchor is inverted in the osgWidget::Window::update function.
Here is a small patch to fix that."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgWidget/Window.cpp

    r9578 r10489  
    317317    // We only honor ANCHOR requests on topmost Windows, not embedded ones. 
    318318    if((_vAnchor != VA_NONE || _hAnchor != HA_NONE) && !_parent && _wm) { 
    319         if(_vAnchor == VA_TOP) y = 0.0f; 
     319        if(_vAnchor == VA_TOP) y = _wm->getHeight() - _height.current; 
    320320        else if(_vAnchor == VA_CENTER) y = osg::round(_wm->getHeight() / 2.0f); 
    321         else if(_vAnchor == VA_BOTTOM) y = _wm->getHeight() - _height.current; 
     321        else if(_vAnchor == VA_BOTTOM) y = 0.0f; 
    322322 
    323323        if(_hAnchor == HA_LEFT) x = 0.0f;