In some cases menu bar height is reported as 0 when the menu hasn't fully realized yet. Nee to update the height during idle time if it is 0, otherwise no menu is shown.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@66344 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -560,6 +560,16 @@ void wxFrame::OnInternalIdle()
|
|||||||
|
|
||||||
#if wxUSE_MENUS_NATIVE
|
#if wxUSE_MENUS_NATIVE
|
||||||
if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
|
if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
|
||||||
|
|
||||||
|
// UpdateMenuBarSize may return a height of zero on some
|
||||||
|
// systems (e.g. Ubuntu 11.04 Alpha as of 2010-12-06),
|
||||||
|
// when the menubar widget has not been fully realized.
|
||||||
|
// Update the menu bar size again at this point, otherwise
|
||||||
|
// the menu would not be visible at all.
|
||||||
|
if (!m_menuBarHeight)
|
||||||
|
{
|
||||||
|
UpdateMenuBarSize();
|
||||||
|
}
|
||||||
#endif // wxUSE_MENUS_NATIVE
|
#endif // wxUSE_MENUS_NATIVE
|
||||||
#if wxUSE_TOOLBAR
|
#if wxUSE_TOOLBAR
|
||||||
if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
|
if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
|
||||||
|
Reference in New Issue
Block a user