]> git.saurik.com Git - wxWidgets.git/commitdiff
~wxToolBar() checks if the frame is being deleted in a better/more clear way
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 24 Sep 2001 00:16:48 +0000 (00:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 24 Sep 2001 00:16:48 +0000 (00:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/tbar95.cpp

index 46ab1c4fe25744aae16976962088527fd54fa044..1464a65e84bb9a6c4a2209b17ce416620ff75a2c 100644 (file)
@@ -264,11 +264,8 @@ wxToolBar::~wxToolBar()
 {
     // 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();
     }