Fix positioning of BPopUpMenu when a nested item is selected.

Signed-off-by: John Scipione <jscipione@gmail.com>
This commit is contained in:
Jessica Hamilton 2013-05-02 15:59:03 +12:00 committed by John Scipione
parent ecc0703995
commit 3bf528b59c
1 changed files with 6 additions and 1 deletions

View File

@ -293,8 +293,13 @@ BPopUpMenu::ScreenLocation()
superMenu->ConvertToScreen(&point);
if (selectedItem != NULL)
if (selectedItem != NULL) {
while (selectedItem->Menu() != this
&& selectedItem->Menu()->Superitem() != NULL) {
selectedItem = selectedItem->Menu()->Superitem();
}
point.y -= selectedItem->Frame().top;
}
return point;
}