Add wxGrid::DoEnableCellEditControl() with bool return value
Checking the new function return value is simpler than checking the value of m_cellEditCtrlEnabled after calling EnableCellEditControl(). Do this now also when starting editing using the mouse, as it was simply forgotten before and so StartingClick() was still called even if editing was vetoed. Also add DoDisableCellEditControl(), but this one exists purely for the symmetry.
This commit is contained in:
@@ -2912,6 +2912,14 @@ private:
|
||||
void DoShowCellEditControl();
|
||||
void DoHideCellEditControl();
|
||||
|
||||
// Unconditionally try showing the editor for the current cell.
|
||||
//
|
||||
// Returns false if the user code vetoed wxEVT_GRID_EDITOR_SHOWN.
|
||||
bool DoEnableCellEditControl();
|
||||
|
||||
// Unconditionally disable (accepting the changes) the editor.
|
||||
void DoDisableCellEditControl();
|
||||
|
||||
// Accept the changes in the edit control, i.e. save them to the table and
|
||||
// dismiss the editor. Also reset m_cellEditCtrlEnabled.
|
||||
void DoAcceptCellEditControl();
|
||||
|
Reference in New Issue
Block a user