Fix swapping items client data in wxEditableListBox.
Use wxUIntPtr, not long, and SetItemPtrData() instead of SetItemData(), to ensure that we preserve the values of client data pointers in 64 bit build, otherwise they were truncated to 32 bits. Closes #15687. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -378,10 +378,10 @@ void wxEditableListBox::SwapItems(long i1, long i2)
|
|||||||
m_listCtrl->SetItemText(i2, t1);
|
m_listCtrl->SetItemText(i2, t1);
|
||||||
|
|
||||||
// swap the item data
|
// swap the item data
|
||||||
long d1 = m_listCtrl->GetItemData(i1);
|
wxUIntPtr d1 = m_listCtrl->GetItemData(i1);
|
||||||
long d2 = m_listCtrl->GetItemData(i2);
|
wxUIntPtr d2 = m_listCtrl->GetItemData(i2);
|
||||||
m_listCtrl->SetItemData(i1, d2);
|
m_listCtrl->SetItemPtrData(i1, d2);
|
||||||
m_listCtrl->SetItemData(i2, d1);
|
m_listCtrl->SetItemPtrData(i2, d1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user