]> git.saurik.com Git - wxWidgets.git/commitdiff
in wxAuiNotebook, code to reduce flicker on page close
authorBenjamin Williams <bwilliams@kirix.com>
Wed, 27 Jun 2007 12:36:47 +0000 (12:36 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Wed, 27 Jun 2007 12:36:47 +0000 (12:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibook.cpp

index 61353a43a3dacbdb352757e789252408da06ed61..2899836cd4bbf7ccad59bd30608615cc2aceb2ad 100644 (file)
@@ -2642,7 +2642,14 @@ bool wxAuiNotebook::InsertPage(size_t page_idx,
 // and destroys the window as well
 bool wxAuiNotebook::DeletePage(size_t page_idx)
 {
+    if (page_idx >= m_tabs.GetPageCount())
+        return false;
+        
     wxWindow* wnd = m_tabs.GetWindowFromIdx(page_idx);
+    
+    // hide the window in advance, as this will
+    // prevent flicker
+    ShowWnd(wnd, false);
 
     if (!RemovePage(page_idx))
         return false;