Update wxBookCtrlBase::m_selection outside UpdateSelectedPage()

Change m_selection in wxBookCtrlBase::DoSetSelection() itself instead of
requiring all the derived class overriding do it in their overridden
UpdateSelectedPage().

No real changes, this is just a small simplification.
This commit is contained in:
Vadim Zeitlin
2018-03-25 00:07:00 +01:00
parent a3d0748a76
commit af6a61e3a0
5 changed files with 5 additions and 6 deletions

View File

@@ -86,8 +86,7 @@ protected:
void UpdateSelectedPage(size_t newsel) wxOVERRIDE
{
m_selection = static_cast<int>(newsel);
GetChoiceCtrl()->Select(m_selection);
GetChoiceCtrl()->Select(newsel);
}
wxBookCtrlEvent* CreatePageChangingEvent() const wxOVERRIDE;