Ensure that rects from wxListCtrl are also offset by the header height
This commit is contained in:
@@ -595,6 +595,7 @@ bool wxListCtrl::GetItemRect(long item, wxRect& rect, int WXUNUSED(code)) const
|
||||
if ( qitem != NULL )
|
||||
{
|
||||
rect = wxQtConvertRect( m_qtTreeWidget->visualItemRect(qitem) );
|
||||
rect.Offset(0, m_qtTreeWidget->header()->height());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -612,6 +613,7 @@ bool wxListCtrl::GetSubItemRect(long item, long subItem, wxRect& rect, int WXUNU
|
||||
wxT("invalid column index in GetSubItemRect") );
|
||||
QModelIndex qindex = m_qtTreeWidget->model()->index(item, subItem);
|
||||
rect = wxQtConvertRect( m_qtTreeWidget->visualRect(qindex) );
|
||||
rect.Offset(0, m_qtTreeWidget->header()->height());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user