fixed bug with SetSelection() not hiding the previously shown page
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -357,10 +357,12 @@ int wxListbook::SetSelection(size_t n)
|
|||||||
|
|
||||||
if ( (int)n != m_selection )
|
if ( (int)n != m_selection )
|
||||||
{
|
{
|
||||||
m_selection = n;
|
m_list->Select(n);
|
||||||
|
m_list->Focus(n);
|
||||||
|
|
||||||
m_list->Select(m_selection);
|
// change m_selection only now, otherwise OnListSelected() would ignore
|
||||||
m_list->Focus(m_selection);
|
// the selection change event
|
||||||
|
m_selection = n;
|
||||||
}
|
}
|
||||||
|
|
||||||
return selOld;
|
return selOld;
|
||||||
|
Reference in New Issue
Block a user