]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/treebase.cpp
remove apparently unused file (src/osx/core/gsocket.cpp seems to have replaced it)
[wxWidgets.git] / src / common / treebase.cpp
index 548b01fb763235dd5b9cc00a6efca4c63857d314..7a1a2d8fcf594f8eb9df053e1136a1c2b43612d1 100644 (file)
@@ -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;
     }