Only return the requested data from generic wxListCtrl::GetItem().
For compatibility with MSW, only return the data that was requested by the item mask from wxListCtrl::GetItem(). This harmonizes the behaviour between all ports. Closes #1621. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -342,12 +342,23 @@ bool wxListHeaderData::IsHit( int x, int y ) const
|
|||||||
|
|
||||||
void wxListHeaderData::GetItem( wxListItem& item )
|
void wxListHeaderData::GetItem( wxListItem& item )
|
||||||
{
|
{
|
||||||
item.m_mask = m_mask;
|
long mask = item.m_mask;
|
||||||
item.m_text = m_text;
|
if ( !mask )
|
||||||
item.m_image = m_image;
|
{
|
||||||
item.m_format = m_format;
|
// by default, get everything for backwards compatibility
|
||||||
item.m_width = m_width;
|
mask = -1;
|
||||||
item.m_state = m_state;
|
}
|
||||||
|
|
||||||
|
if ( mask & wxLIST_MASK_STATE )
|
||||||
|
item.m_state = m_state;
|
||||||
|
if ( mask & wxLIST_MASK_TEXT )
|
||||||
|
item.m_text = m_text;
|
||||||
|
if ( mask & wxLIST_MASK_IMAGE )
|
||||||
|
item.m_image = m_image;
|
||||||
|
if ( mask & wxLIST_MASK_WIDTH )
|
||||||
|
item.m_width = m_width;
|
||||||
|
if ( mask & wxLIST_MASK_FORMAT )
|
||||||
|
item.m_format = m_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListHeaderData::GetImage() const
|
int wxListHeaderData::GetImage() const
|
||||||
|
Reference in New Issue
Block a user