FIRE-31065: Make sure menu is shown on the screen properly

meow-7.2.2
Ansariel 2021-07-15 12:31:11 +02:00
parent 8425d8c717
commit 48012f1ce7
1 changed files with 5 additions and 1 deletions

View File

@ -3378,7 +3378,11 @@ void LLMenuGL::showPopup(LLView* spawning_view, LLMenuGL* menu, S32 x, S32 y, S3
CURSOR_WIDTH + MOUSE_CURSOR_PADDING * 2,
CURSOR_HEIGHT + MOUSE_CURSOR_PADDING * 2);
menu->translateIntoRectWithExclusion( menu_region_rect, mouse_rect );
if (menu->getRect().mTop > menu_region_rect.mTop)
// <FS:Ansariel> FIRE-31065: Make sure menu is shown on the screen properly
//if (menu->getRect().mTop > menu_region_rect.mTop)
if (menu->getRect().mTop > menu_region_rect.mTop ||
menu->getRect().mBottom < menu_region_rect.mBottom)
// </FS:Ansariel>
{
// not enough space: align with top, ignore exclusion
menu->translateIntoRect( menu_region_rect );