wxHashTable attrsNew(wxKEY_INTEGER, 1000);
for ( n = 0; n < count; n++ )
{
- wxObject *attr = m_attrs.Delete(n);
+ wxObject *attr = m_attrs.Delete(aItems[n]);
if ( attr )
{
- attrsNew.Put(aItems[n], attr);
+ attrsNew.Put(n, attr);
}
}
int itemCount = GetItemCount();
int i;
- for (i = 0; i < itemCount; i++)
+ if (drawHRules)
{
- if (GetItemRect(i, itemRect))
+ long top = GetTopItem();
+ for (i = top; i < top + GetCountPerPage() + 1; i++)
{
- cy = itemRect.GetTop();
- if (i != 0) // Don't draw the first one
- {
- dc.DrawLine(0, cy, clientSize.x, cy);
- }
- // Draw last line
- if (i == (GetItemCount() - 1))
+ if (GetItemRect(i, itemRect))
{
- cy = itemRect.GetBottom();
- dc.DrawLine(0, cy, clientSize.x, cy);
+ cy = itemRect.GetTop();
+ if (i != 0) // Don't draw the first one
+ {
+ dc.DrawLine(0, cy, clientSize.x, cy);
+ }
+ // Draw last line
+ if (i == itemCount - 1)
+ {
+ cy = itemRect.GetBottom();
+ dc.DrawLine(0, cy, clientSize.x, cy);
+ }
}
}
}
- i = (GetItemCount() - 1);
+ i = itemCount - 1;
if (drawVRules && (i > -1))
{
wxRect firstItemRect;