- wxListEvent evCache(wxEVT_COMMAND_LIST_CACHE_HINT, GetParent()->GetId());
- evCache.SetEventObject( GetParent() );
- evCache.m_oldItemIndex = visibleFrom;
- evCache.m_itemIndex = visibleTo;
- GetParent()->GetEventHandler()->ProcessEvent( evCache );
+ if ( IsVirtual() )
+ {
+ wxListEvent evCache(wxEVT_COMMAND_LIST_CACHE_HINT,
+ GetParent()->GetId());
+ evCache.SetEventObject( GetParent() );
+ evCache.m_oldItemIndex = visibleFrom;
+ evCache.m_itemIndex = visibleTo;
+ GetParent()->GetEventHandler()->ProcessEvent( evCache );
+ }