extracted wxFrame::MSWTranslateMessage() implementation into new MSWDoTranslateMessage so that it can be reused by wxMDIChildFrame; this allows to pass the correct window to ::TranslateAccelerator() and fix UI updating of the MDI child menu items (bug 1214439)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -726,7 +726,7 @@ WXHICON wxFrame::GetDefaultIcon() const
|
||||
// preprocessing
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
bool wxFrame::MSWTranslateMessage(WXMSG* pMsg)
|
||||
bool wxFrame::MSWDoTranslateMessage(wxFrame *frame, WXMSG *pMsg)
|
||||
{
|
||||
if ( wxWindow::MSWTranslateMessage(pMsg) )
|
||||
return true;
|
||||
@@ -737,7 +737,7 @@ bool wxFrame::MSWTranslateMessage(WXMSG* pMsg)
|
||||
if ( menuBar )
|
||||
{
|
||||
const wxAcceleratorTable& acceleratorTable = menuBar->GetAccelTable();
|
||||
return acceleratorTable.Translate(this, pMsg);
|
||||
return acceleratorTable.Translate(frame, pMsg);
|
||||
}
|
||||
#endif // wxUSE_MENUS && wxUSE_ACCEL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user