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:
Artur Wieczorek
2016-10-04 23:20:06 +02:00
parent fb5f6c4720
commit 2ec1bad4d6
3 changed files with 9 additions and 4 deletions

View File

@@ -1485,7 +1485,9 @@ public:
bool HasSelection() const;
/**
Hittest.
Retrieves item and column at the given point.
The point coordinates are specified in wxDataViewCtrl client area
coordinates.
*/
virtual void HitTest(const wxPoint& point, wxDataViewItem& item,
wxDataViewColumn*& col) const;
@@ -2398,8 +2400,7 @@ public:
const wxDataViewItem & item,
unsigned int col);
/**
/**
Override this to render the cell.
Before this is called, wxDataViewRenderer::SetValue was called
so that this instance knows what to render.