]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/tabmdi.cpp
don't compute (and mainly don't cache) our best size until we have created the radio...
[wxWidgets.git] / src / aui / tabmdi.cpp
index 71f53429d48b23a3c35b42c2761f8f52b32eb003..ddbdad83d60ca6d36e95ae0d4518d70e14032074 100644 (file)
@@ -400,16 +400,14 @@ bool wxTabMDIChildFrame::Destroy()
     wxTabMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow();
     wxASSERT_MSG(pClientWindow, wxT("Missing MDI Client Window"));
 
-    bool bActive = false;
     if (pParentFrame->GetActiveChild() == this)
     {
         pParentFrame->SetActiveChild(NULL);
         pParentFrame->SetChildMenuBar(NULL);
-        bActive = true;
     }
 
-    size_t pos, page_count = pClientWindow->GetPageCount();
-    for (pos = 0; pos < page_count; pos++)
+    const size_t page_count = pClientWindow->GetPageCount();
+    for (size_t pos = 0; pos < page_count; pos++)
     {
         if (pClientWindow->GetPage(pos) == this)
             return pClientWindow->DeletePage(pos);