Adjust point coordinates in wxDataViewCtrl::HitTest
Point coordinates passed from wxDataViewCtrl::HitTest() to wxDataViewMainWindow::HitTest() should be converted from wxDataViewCtrl client coordinates to wxDataViewMainWindow client coordinates because they can different due to the presence of the header in wxDataViewCtrl client area.
This commit is contained in:
@@ -5340,7 +5340,10 @@ void wxDataViewCtrl::EnsureVisible( const wxDataViewItem & item, const wxDataVie
|
||||
void wxDataViewCtrl::HitTest( const wxPoint & point, wxDataViewItem & item,
|
||||
wxDataViewColumn* &column ) const
|
||||
{
|
||||
m_clientArea->HitTest(point, item, column);
|
||||
// Convert from wxDataViewCtrl coordinates to wxDataViewMainWindow coordinates.
|
||||
// (They can be different due to the presence of the header.).
|
||||
const wxPoint clientPt = m_clientArea->ScreenToClient(ClientToScreen(point));
|
||||
m_clientArea->HitTest(clientPt, item, column);
|
||||
}
|
||||
|
||||
wxRect wxDataViewCtrl::GetItemRect( const wxDataViewItem & item,
|
||||
|
Reference in New Issue
Block a user