]> git.saurik.com Git - wxWidgets.git/commitdiff
removed unnecessary commented code
authorBenjamin Williams <bwilliams@kirix.com>
Tue, 7 Nov 2006 08:37:36 +0000 (08:37 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Tue, 7 Nov 2006 08:37:36 +0000 (08:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibook.cpp

index 24e417f3c7995b0bbc5982c15d011ac5c961f38a..6d25dde4c63d41e63fb9bab9a04513b42b0d8487 100644 (file)
@@ -2359,74 +2359,6 @@ bool wxAuiNotebook::DeletePage(size_t page_idx)
     }
     
     return true;
-    
-/*
-
-    wxWindow* wnd = m_tabs.GetWindowFromIdx(page_idx);
-    wxWindow* new_active = NULL;
-
-    // find out which onscreen tab ctrl owns this tab
-    wxAuiTabCtrl* ctrl;
-    int ctrl_idx;
-    if (!FindTab(wnd, &ctrl, &ctrl_idx))
-        return false;
-
-    // find a new page and set it as active
-    int new_idx = ctrl_idx+1;
-    if (new_idx >= (int)ctrl->GetPageCount())
-        new_idx = ctrl_idx-1;
-
-    if (new_idx >= 0 && new_idx < (int)ctrl->GetPageCount())
-    {
-        new_active = ctrl->GetWindowFromIdx(new_idx);
-    }
-     else
-    {
-        // set the active page to the first page that
-        // isn't the one being deleted
-        size_t i, page_count = m_tabs.GetPageCount();
-        for (i = 0; i < page_count; ++i)
-        {
-            wxWindow* w = m_tabs.GetWindowFromIdx(i);
-            if (wnd != w)
-            {
-                new_active = m_tabs.GetWindowFromIdx(i);
-                break;
-            }
-        }
-    }
-
-    // remove the tab from main catalog
-    if (!m_tabs.RemovePage(wnd))
-        return false;
-
-    // remove the tab from the onscreen tab ctrl
-    ctrl->RemovePage(wnd);
-
-    // actually destroy the window now
-    if (wnd->IsKindOf(CLASSINFO(wxAuiMDIChildFrame)))
-    {
-        // delete the child frame with pending delete, as is
-        // customary with frame windows
-        if (!wxPendingDelete.Member(wnd))
-            wxPendingDelete.Append(wnd);
-    }
-     else
-    {
-        wnd->Destroy();
-    }
-
-    RemoveEmptyTabFrames();
-
-    // set new active pane
-    if (new_active)
-    {
-        m_curpage = -1;
-        SetSelection(m_tabs.GetIdxFromWindow(new_active));
-    }
-    
-    return true;
-    */
 }