git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3760
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// For some reason, wxWindows can activate another task altogether
// when a frame is destroyed after a modal dialog has been invoked.
// Try to bring the parent to the top.
// For some reason, wxWindows can activate another task altogether
// when a frame is destroyed after a modal dialog has been invoked.
// Try to bring the parent to the top.
+ // MT:Only do this if this frame is currently the active window, else weird
+ // things start to happen
+ if ( wxGetActiveWindow() == this )
if (GetParent() && GetParent()->GetHWND())
::BringWindowToTop((HWND) GetParent()->GetHWND());
}
if (GetParent() && GetParent()->GetHWND())
::BringWindowToTop((HWND) GetParent()->GetHWND());
}
return FALSE;
wxMenuItem *item = bar->FindItemForId(id);
return FALSE;
wxMenuItem *item = bar->FindItemForId(id);
- if ( !item )
- return FALSE;
- if ( item->IsCheckable() )
+ if ( item && item->IsCheckable() )
{
bar->Check(id, !bar->IsChecked(id)) ;
}
{
bar->Check(id, !bar->IsChecked(id)) ;
}