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