When using virtual list control the main program already has the items data so
it's completely useless to call GetItem() when preparing an event for it. It
is also inefficient to call GetItem() for potentially many items.
For both of these reasons the generic version already didn't fill the item
contents for virtual list controls events. Now modify wxMSW to not do it
neither.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70271
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// fill in the item before passing it to the event handler if we do have a
// valid item index and haven't filled it yet (e.g. for LVN_ITEMCHANGED)
- if ( event.m_itemIndex != -1 && !event.m_item.GetMask() )
+ // and we're not using a virtual control as in this case the program
+ // already has the data anyhow and we don't want to call GetItem() for
+ // potentially many items
+ if ( event.m_itemIndex != -1 && !event.m_item.GetMask()
+ && !IsVirtual() )
{
wxListItem& item = event.m_item;