bool m_isDragging;
wxPoint m_startDragPos;
- wxTimer* m_editTimer;
- bool m_waitForSlowClick;
+ bool m_waitForSlowClick;
wxGridCellCoords m_selectionStart;
void OnSize( wxSizeEvent& );
void OnKeyDown( wxKeyEvent& );
void OnEraseBackground( wxEraseEvent& );
- void OnEditTimer( wxTimerEvent& );
void SetCurrentCell( const wxGridCellCoords& coords );
//////////////////////////////////////////////////////////////////////
-#define ID_EDIT_TIMER 1001
IMPLEMENT_DYNAMIC_CLASS( wxGrid, wxScrolledWindow )
EVT_SIZE( wxGrid::OnSize )
EVT_KEY_DOWN( wxGrid::OnKeyDown )
EVT_ERASE_BACKGROUND( wxGrid::OnEraseBackground )
- EVT_TIMER( ID_EDIT_TIMER, wxGrid::OnEditTimer )
END_EVENT_TABLE()
wxGrid::wxGrid( wxWindow *parent,
if (m_ownTable)
delete m_table;
- delete m_editTimer;
}
void wxGrid::Create()
{
m_created = FALSE; // set to TRUE by CreateGrid
- m_displayed = FALSE; // set to TRUE by OnPaint
+ m_displayed = TRUE; // FALSE; // set to TRUE by OnPaint
m_table = (wxGridTableBase *) NULL;
m_ownTable = FALSE;
m_isDragging = FALSE;
m_startDragPos = wxDefaultPosition;
- m_editTimer = new wxTimer( this, ID_EDIT_TIMER );
m_waitForSlowClick = FALSE;
m_rowResizeCursor = wxCursor( wxCURSOR_SIZENS );
if (m_waitForSlowClick && coords == m_currentCellCoords) {
EnableCellEditControl(TRUE);
ShowCellEditControl();
+ m_waitForSlowClick = FALSE;
}
else {
SetCurrentCell( coords );
- m_editTimer->Start( 1500, TRUE );
m_waitForSlowClick = TRUE;
}
}
{ }
-void wxGrid::OnEditTimer(wxTimerEvent&)
-{
- m_waitForSlowClick = FALSE;
-}
-
void wxGrid::SetCurrentCell( const wxGridCellCoords& coords )