Moved call to _DeleteMenuWindow() to a better place
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22963 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1327,7 +1327,7 @@ BMenu::_Show(bool selectFirstItem)
|
|||||||
void
|
void
|
||||||
BMenu::_Hide()
|
BMenu::_Hide()
|
||||||
{
|
{
|
||||||
BMenuWindow *window = static_cast<BMenuWindow *>(Window());
|
BMenuWindow *window = dynamic_cast<BMenuWindow *>(Window());
|
||||||
if (window == NULL || !window->Lock())
|
if (window == NULL || !window->Lock())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1338,15 +1338,15 @@ BMenu::_Hide()
|
|||||||
window->DetachMenu();
|
window->DetachMenu();
|
||||||
// we don't want to be deleted when the window is removed
|
// we don't want to be deleted when the window is removed
|
||||||
|
|
||||||
// Delete the menu window used by our submenus
|
|
||||||
_DeleteMenuWindow();
|
|
||||||
|
|
||||||
if (fSuper != NULL)
|
if (fSuper != NULL)
|
||||||
window->Unlock();
|
window->Unlock();
|
||||||
else {
|
else {
|
||||||
// it's our window, quit it
|
// it's our window, quit it
|
||||||
window->Quit();
|
window->Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete the menu window used by our submenus
|
||||||
|
_DeleteMenuWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user