for some systems. If this causes no problems then this flag can be
removed.
2. Took out the edit timer so now a second click in the current cell
will activate the edit control, even if it is several seconds later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6015
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool m_isDragging;
wxPoint m_startDragPos;
bool m_isDragging;
wxPoint m_startDragPos;
- wxTimer* m_editTimer;
- bool m_waitForSlowClick;
+ bool m_waitForSlowClick;
wxGridCellCoords m_selectionStart;
wxGridCellCoords m_selectionStart;
void OnSize( wxSizeEvent& );
void OnKeyDown( wxKeyEvent& );
void OnEraseBackground( wxEraseEvent& );
void OnSize( wxSizeEvent& );
void OnKeyDown( wxKeyEvent& );
void OnEraseBackground( wxEraseEvent& );
- void OnEditTimer( wxTimerEvent& );
void SetCurrentCell( const wxGridCellCoords& coords );
void SetCurrentCell( const wxGridCellCoords& coords );
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
-#define ID_EDIT_TIMER 1001
IMPLEMENT_DYNAMIC_CLASS( wxGrid, wxScrolledWindow )
IMPLEMENT_DYNAMIC_CLASS( wxGrid, wxScrolledWindow )
EVT_SIZE( wxGrid::OnSize )
EVT_KEY_DOWN( wxGrid::OnKeyDown )
EVT_ERASE_BACKGROUND( wxGrid::OnEraseBackground )
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,
END_EVENT_TABLE()
wxGrid::wxGrid( wxWindow *parent,
if (m_ownTable)
delete m_table;
if (m_ownTable)
delete m_table;
void wxGrid::Create()
{
m_created = FALSE; // set to TRUE by CreateGrid
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_table = (wxGridTableBase *) NULL;
m_ownTable = FALSE;
m_isDragging = FALSE;
m_startDragPos = wxDefaultPosition;
m_isDragging = FALSE;
m_startDragPos = wxDefaultPosition;
- m_editTimer = new wxTimer( this, ID_EDIT_TIMER );
m_waitForSlowClick = FALSE;
m_rowResizeCursor = wxCursor( wxCURSOR_SIZENS );
m_waitForSlowClick = FALSE;
m_rowResizeCursor = wxCursor( wxCURSOR_SIZENS );
if (m_waitForSlowClick && coords == m_currentCellCoords) {
EnableCellEditControl(TRUE);
ShowCellEditControl();
if (m_waitForSlowClick && coords == m_currentCellCoords) {
EnableCellEditControl(TRUE);
ShowCellEditControl();
+ m_waitForSlowClick = FALSE;
}
else {
SetCurrentCell( coords );
}
else {
SetCurrentCell( coords );
- m_editTimer->Start( 1500, TRUE );
m_waitForSlowClick = TRUE;
}
}
m_waitForSlowClick = TRUE;
}
}
-void wxGrid::OnEditTimer(wxTimerEvent&)
-{
- m_waitForSlowClick = FALSE;
-}
-
void wxGrid::SetCurrentCell( const wxGridCellCoords& coords )
void wxGrid::SetCurrentCell( const wxGridCellCoords& coords )