Remove unnecessary duplicate code dealing with invoking window from wxOSX.
This is roughly the same as r64127 for wxGTK but for wxOSX: don't duplicate the functionality already present in the base class in Mac-specific way. Just use wxMenu::GetWindow() instead of painstakingly propagating invoking window changes via the entire menu hierarchy. Also attach the root menu used in wxOSX to the menu bar to ensure that the correct window can be found for all its menus. Closes #11990. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -231,9 +231,6 @@ void wxFrame::HandleResized( double timestampsec )
|
||||
#if wxUSE_MENUS
|
||||
void wxFrame::DetachMenuBar()
|
||||
{
|
||||
if ( m_frameMenuBar )
|
||||
m_frameMenuBar->UnsetInvokingWindow();
|
||||
|
||||
wxFrameBase::DetachMenuBar();
|
||||
}
|
||||
|
||||
@@ -257,7 +254,6 @@ void wxFrame::AttachMenuBar( wxMenuBar *menuBar )
|
||||
|
||||
if (m_frameMenuBar)
|
||||
{
|
||||
m_frameMenuBar->SetInvokingWindow( this );
|
||||
if (makeCurrent)
|
||||
m_frameMenuBar->MacInstallMenuBar();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user