fix initial layout of the widgets pages: avoid calling Fit() on them

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-12-03 13:43:44 +00:00
parent 70c536f394
commit be16b85933
22 changed files with 9 additions and 39 deletions

View File

@@ -653,12 +653,16 @@ void WidgetsFrame::OnPageChanged(WidgetsBookCtrlEvent& event)
GetMenuBar()->Check(Widgets_BusyCursor, false);
// lazy creation of the pages
// create the pages on demand, otherwise the sample startup is too slow as
// it creates hundreds of controls
WidgetsPage *page = CurrentPage();
if ( page->GetChildren().empty() )
{
wxWindowUpdateLocker noUpdates(page);
page->CreateContent();
//page->Layout();
page->GetSizer()->Fit(page);
WidgetsBookCtrl *book = wxStaticCast(page->GetParent(), WidgetsBookCtrl);
wxSize size;
for ( size_t i = 0; i < book->GetPageCount(); ++i )