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:
@@ -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 )
|
||||
|
Reference in New Issue
Block a user