- event.m_itemIndex = event.m_item.m_itemId;
- }
- break;
- case LVN_ENDLABELEDITW:
- {
- eventType = wxEVT_COMMAND_LIST_END_LABEL_EDIT;
- wxLV_ITEM item(((LV_DISPINFOW *)lParam)->item);
- wxConvertFromMSWListItem(NULL, event.m_item, item);
- if ( ((LV_ITEM)item).pszText == NULL ||
- ((LV_ITEM)item).iItem == -1 )
+ // was editing cancelled?
+ const LV_ITEM& lvi = (LV_ITEM)item;
+ if ( !lvi.pszText || lvi.iItem == -1 )