Reordered the slow-click test, otherwise it would never
be fired if in row-select more. Also added a ClearSelection, which was omitted in the changes since 2.4. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7699361c96
commit
932b55d0d6
@ -5427,7 +5427,20 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
|
||||
m_winCapture = NULL;
|
||||
}
|
||||
|
||||
if ( m_selectingTopLeft != wxGridNoCellCoords &&
|
||||
if ( coords == m_currentCellCoords && m_waitForSlowClick && CanEnableCellControl())
|
||||
{
|
||||
ClearSelection();
|
||||
EnableCellEditControl();
|
||||
|
||||
wxGridCellAttr* attr = GetCellAttr(coords);
|
||||
wxGridCellEditor *editor = attr->GetEditor(this, coords.GetRow(), coords.GetCol());
|
||||
editor->StartingClick();
|
||||
editor->DecRef();
|
||||
attr->DecRef();
|
||||
|
||||
m_waitForSlowClick = FALSE;
|
||||
}
|
||||
else if ( m_selectingTopLeft != wxGridNoCellCoords &&
|
||||
m_selectingBottomRight != wxGridNoCellCoords )
|
||||
{
|
||||
if ( m_selection )
|
||||
@ -5449,21 +5462,6 @@ void wxGrid::ProcessGridCellMouseEvent( wxMouseEvent& event )
|
||||
// drag-shrinking.
|
||||
ShowCellEditControl();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_waitForSlowClick && CanEnableCellControl())
|
||||
{
|
||||
EnableCellEditControl();
|
||||
|
||||
wxGridCellAttr* attr = GetCellAttr(coords);
|
||||
wxGridCellEditor *editor = attr->GetEditor(this, coords.GetRow(), coords.GetCol());
|
||||
editor->StartingClick();
|
||||
editor->DecRef();
|
||||
attr->DecRef();
|
||||
|
||||
m_waitForSlowClick = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( m_cursorMode == WXGRID_CURSOR_RESIZE_ROW )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user