Reduce flicker when removing wxNotebook page.

wxMSW implementation hides all pages except the selected one. But when
removing selected page from the control, this invariant is temporarily
broken and this results in visible flicker. Hiding the page as soon as
it gets removed fixes it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2010-09-01 13:28:43 +00:00
parent 65a14fe8ea
commit 8138f406a2

View File

@@ -688,6 +688,10 @@ wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage)
if ( !pageRemoved )
return NULL;
// hide the removed page to maintain the invariant that only the
// selected page is visible and others are hidden:
pageRemoved->Show(false);
TabCtrl_DeleteItem(GetHwnd(), nPage);
if ( m_pages.IsEmpty() )