Changeset 32055

Show
Ignore:
Timestamp:
04/07/09 12:02:02 (4 years ago)
Author:
kiri_feather
Message:

削除時のIndex-1エラー対応

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/vb2005/Tween/trunk/Tween/Tween.vb

    r32019 r32055  
    21212121                If _curTab.Equals(tb) Then 
    21222122                    _curList.SelectedIndices.Clear() 
    2123                     If _statuses.Tabs(tb.Text).AllCount - 1 > fidx Then 
    2124                         _curList.SelectedIndices.Add(fidx) 
    2125                     Else 
    2126                         _curList.SelectedIndices.Add(_statuses.Tabs(tb.Text).AllCount - 1) 
     2123                    If _statuses.Tabs(tb.Text).AllCount > 0 Then 
     2124                        If _statuses.Tabs(tb.Text).AllCount - 1 > fidx AndAlso fidx > -1 Then 
     2125                            _curList.SelectedIndices.Add(fidx) 
     2126                        Else 
     2127                            _curList.SelectedIndices.Add(_statuses.Tabs(tb.Text).AllCount - 1) 
     2128                        End If 
     2129                        If _curList.SelectedIndices.Count > 0 Then 
     2130                            _curList.EnsureVisible(_curList.SelectedIndices(0)) 
     2131                            _curList.FocusedItem = _curList.Items(_curList.SelectedIndices(0)) 
     2132                        End If 
    21272133                    End If 
    2128                     _curList.EnsureVisible(_curList.SelectedIndices(0)) 
    2129                     _curList.FocusedItem = _curList.Items(_curList.SelectedIndices(0)) 
    21302134                End If 
    21312135                If _statuses.Tabs(tb.Text).UnreadCount = 0 AndAlso tb.ImageIndex = 0 Then tb.ImageIndex = -1