Permalink
Browse files

Merge branch 'master' of git@github.com:Shyotl/SingularityViewer.git

  • Loading branch information...
Shyotl committed Feb 8, 2017
2 parents 7a1633a + 271c374 commit aee659b518cd197a612328eb0df0120a6d04c853
Showing with 8 additions and 1 deletion.
  1. +8 −1 indra/llui/llmenugl.cpp
View
@@ -1509,11 +1509,18 @@ void LLMenuItemBranchGL::openMenu()
branch->localPointToOtherView( 0, 0, &x, &y, branch->getParent() );
F32 center_y = top - (getRect().getHeight() / 2.f);
if( y < menu_region_rect.mBottom && center_y <= menu_region_rect.getCenterY())
{
// open upwards if menu extends past bottom
// adjust by the height of the menu item branch since it is a submenu
delta_y = branch_rect.getHeight() - getRect().getHeight();
delta_y = branch_rect.getHeight() - getRect().getHeight();
// Singu: Handle menu clipping off the top of the screen too.
if ( branch_rect.mTop + delta_y > menu_region_rect.mTop )
{
delta_y -= branch_rect.mTop + delta_y - menu_region_rect.mTop;
delta_y -= delta_y % getRect().getHeight();
}
}
if( x + branch_rect.getWidth() > menu_region_rect.mRight )

0 comments on commit aee659b

Please sign in to comment.