Fix position in dummy wxMouseEvent used by wxGridHeaderCtrl

This probably doesn't matter much, but use the correct mouse position in
this event, expressed in wxGrid coordinate system instead of using
screen coordinates.
This commit is contained in:
Vadim Zeitlin
2020-03-01 02:02:34 +01:00
parent 52b7267aac
commit 5986584fc0

View File

@@ -163,12 +163,13 @@ protected:
wxGrid *GetOwner() const { return static_cast<wxGrid *>(GetParent()); }
private:
static wxMouseEvent GetDummyMouseEvent()
wxMouseEvent GetDummyMouseEvent() const
{
// make up a dummy event for the grid event to use -- unfortunately we
// can't do anything else here
wxMouseEvent e;
e.SetState(wxGetMouseState());
GetOwner()->ScreenToClient(&e.m_x, &e.m_y);
return e;
}