properly offset the mouse position for the label window clicks
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -6618,6 +6618,32 @@ int wxGrid::SendEvent( const wxEventType type,
|
|||||||
claimed = GetEventHandler()->ProcessEvent(gridEvt);
|
claimed = GetEventHandler()->ProcessEvent(gridEvt);
|
||||||
vetoed = !gridEvt.IsAllowed();
|
vetoed = !gridEvt.IsAllowed();
|
||||||
}
|
}
|
||||||
|
else if ( type == wxEVT_GRID_LABEL_LEFT_CLICK ||
|
||||||
|
type == wxEVT_GRID_LABEL_LEFT_DCLICK ||
|
||||||
|
type == wxEVT_GRID_LABEL_RIGHT_CLICK ||
|
||||||
|
type == wxEVT_GRID_LABEL_RIGHT_DCLICK )
|
||||||
|
{
|
||||||
|
wxPoint pos = mouseEv.GetPosition();
|
||||||
|
|
||||||
|
if ( mouseEv.GetEventObject() == GetGridRowLabelWindow() )
|
||||||
|
pos.y += GetColLabelSize();
|
||||||
|
if ( mouseEv.GetEventObject() == GetGridColLabelWindow() )
|
||||||
|
pos.x += GetRowLabelSize();
|
||||||
|
|
||||||
|
wxGridEvent gridEvt( GetId(),
|
||||||
|
type,
|
||||||
|
this,
|
||||||
|
row, col,
|
||||||
|
pos.x,
|
||||||
|
pos.y,
|
||||||
|
false,
|
||||||
|
mouseEv.ControlDown(),
|
||||||
|
mouseEv.ShiftDown(),
|
||||||
|
mouseEv.AltDown(),
|
||||||
|
mouseEv.MetaDown() );
|
||||||
|
claimed = GetEventHandler()->ProcessEvent(gridEvt);
|
||||||
|
vetoed = !gridEvt.IsAllowed();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxGridEvent gridEvt( GetId(),
|
wxGridEvent gridEvt( GetId(),
|
||||||
|
Reference in New Issue
Block a user