git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11684
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
// we must refresh the frame size when the toolbar is deleted but the frame
// is not - otherwise toolbar leaves a hole in the place it used to occupy
- //
- // NB: a frame is being deleted only if it is not any longer in
- // wxTopLevelWindows list
wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
- if ( frame && wxTopLevelWindows.Find(frame) )
+ if ( frame && !frame->IsBeingDeleted() )
{
frame->SendSizeEvent();
}