Fix MSVC14 warnings about a shadowed variable in the widgets sample.
Just to suppress some harmless warnings.
This commit is contained in:
@@ -717,15 +717,15 @@ void WidgetsFrame::OnPageChanged(WidgetsBookCtrlEvent& event)
|
|||||||
|
|
||||||
// create the pages on demand, otherwise the sample startup is too slow as
|
// create the pages on demand, otherwise the sample startup is too slow as
|
||||||
// it creates hundreds of controls
|
// it creates hundreds of controls
|
||||||
WidgetsPage *page = CurrentPage();
|
WidgetsPage *curPage = CurrentPage();
|
||||||
if ( page->GetChildren().empty() )
|
if ( curPage->GetChildren().empty() )
|
||||||
{
|
{
|
||||||
wxWindowUpdateLocker noUpdates(page);
|
wxWindowUpdateLocker noUpdates(curPage);
|
||||||
page->CreateContent();
|
curPage->CreateContent();
|
||||||
//page->Layout();
|
//curPage->Layout();
|
||||||
page->GetSizer()->Fit(page);
|
curPage->GetSizer()->Fit(curPage);
|
||||||
|
|
||||||
WidgetsBookCtrl *book = wxStaticCast(page->GetParent(), WidgetsBookCtrl);
|
WidgetsBookCtrl *book = wxStaticCast(curPage->GetParent(), WidgetsBookCtrl);
|
||||||
wxSize size;
|
wxSize size;
|
||||||
for ( size_t i = 0; i < book->GetPageCount(); ++i )
|
for ( size_t i = 0; i < book->GetPageCount(); ++i )
|
||||||
{
|
{
|
||||||
@@ -735,10 +735,10 @@ void WidgetsFrame::OnPageChanged(WidgetsBookCtrlEvent& event)
|
|||||||
size.IncTo(page->GetSize());
|
size.IncTo(page->GetSize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
page->SetSize(size);
|
curPage->SetSize(size);
|
||||||
}
|
}
|
||||||
// re-apply the attributes to the widget(s)
|
// re-apply the attributes to the widget(s)
|
||||||
page->SetUpWidget();
|
curPage->SetUpWidget();
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user