]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/tabmdi.cpp
Commited region iterator fix.
[wxWidgets.git] / src / aui / tabmdi.cpp
index a995ee8462d529f5d7d24aec076c52c4f33b2c6e..ddbdad83d60ca6d36e95ae0d4518d70e14032074 100644 (file)
@@ -161,7 +161,7 @@ void wxTabMDIParentFrame::SetChildMenuBar(wxTabMDIChildFrame* pChild)
     {
         if (pChild->GetMenuBar() == NULL)
             return;
-            
+
         // Do we need to save the current bar?
         if (m_pMyMenuBar == NULL)
             m_pMyMenuBar = GetMenuBar();
@@ -283,7 +283,7 @@ void wxTabMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar)
 {
     if (pMenuBar && m_pWindowMenu)
     {
-        int pos = pMenuBar->FindMenu(wxGetStockLabel(wxID_HELP,false));
+        int pos = pMenuBar->FindMenu(wxGetStockLabel(wxID_HELP,wxSTOCK_NOFLAGS));
         if (pos == wxNOT_FOUND)
             pMenuBar->Append(m_pWindowMenu, _("&Window"));
              else
@@ -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);