Remove check for read only cells from IsCellEditControlEnabled()
This check was introduced back in283b7808d8
(added support for readonly cells and 3d border drawing, 2000-02-16), but was wrong even then and remained wrong ever since: we must not set m_cellEditCtrlEnabled to true when the current cell is read-only, so there is no need to check for the latter condition if m_cellEditCtrlEnabled is indeed true. Ensure that we really never erroneously set m_cellEditCtrlEnabled for the read-only cells by replacing an wxASSERT_MSG checking for this in EnableCellEditControl() with wxCHECK_RET(). Also explicitly document this function precondition, also added back inb54ba67107
([...] added CanEnableCellControl() and use it before calling EnableEC, 2000-02-17) but never documented so far.
This commit is contained in:
@@ -1504,7 +1504,7 @@ public:
|
||||
void EnableCellEditControl( bool enable = true );
|
||||
void DisableCellEditControl() { EnableCellEditControl(false); }
|
||||
bool CanEnableCellControl() const;
|
||||
bool IsCellEditControlEnabled() const;
|
||||
bool IsCellEditControlEnabled() const { return m_cellEditCtrlEnabled; }
|
||||
bool IsCellEditControlShown() const;
|
||||
|
||||
bool IsCurrentCellReadOnly() const;
|
||||
|
Reference in New Issue
Block a user