Next part of tree state icon patches
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -110,13 +110,19 @@ void wxTreeCtrlBase::SetItemState(const wxTreeItemId& item, int state)
|
||||
{
|
||||
if ( state == wxTREE_ITEMSTATE_NEXT )
|
||||
{
|
||||
state = GetItemState(item) + 1;
|
||||
int current = GetItemState(item);
|
||||
if ( current == wxTREE_ITEMSTATE_NONE )
|
||||
return;
|
||||
state = current + 1;
|
||||
if ( m_imageListState && state >= m_imageListState->GetImageCount() )
|
||||
state = 0;
|
||||
}
|
||||
else if ( state == wxTREE_ITEMSTATE_PREV )
|
||||
{
|
||||
state = GetItemState(item) - 1;
|
||||
int current = GetItemState(item);
|
||||
if ( current == wxTREE_ITEMSTATE_NONE )
|
||||
return;
|
||||
state = current - 1;
|
||||
if ( state == -1 )
|
||||
state = m_imageListState ? m_imageListState->GetImageCount() - 1 : 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user