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

@@ -155,9 +155,10 @@ public:
}
protected:
virtual void UpdateSelectedPage(size_t newsel) wxOVERRIDE
virtual void UpdateSelectedPage(size_t WXUNUSED(newsel)) wxOVERRIDE
{
m_selection = (int)newsel;
// Nothing to do here, but must be overridden to avoid the assert in
// the base class version.
}
virtual wxBookCtrlEvent* CreatePageChangingEvent() const wxOVERRIDE