Adapt to grid activatable editors

Since wxWidgets uses an activable editor for wxGridCellBoolEditor,
wxGridEditorCreatedEvent is no longer emitted for such a column.

See https://trac.wxwidgets.org/ticket/19071

Using wxEVT_GRID_CELL_CHANGED to clear all checkboxes in preferred
column, instead of relying on the created editor pointer which can no
longer be referenced.
This commit is contained in:
SET
2021-02-05 12:14:39 +01:00
parent 0146542324
commit 472a3a8fd0
3 changed files with 10 additions and 25 deletions

View File

@@ -138,7 +138,6 @@ private:
wxArrayString m_colTypeChoices;
wxString m_intentLabel;
uint m_nbInsertRows;
wxCheckBox * m_PrefEditor;
/**
* Configures the Preferred column for editing and rendering using a
* checkbox.
@@ -155,20 +154,12 @@ private:
* Binds the grid to editor creation and hidden events.
*/
void PrepareGrid();
/**
* References the wxCheckBox editor.
* <br/>
* Does nothing for the other columns.
*
* @param evt
*/
void OnEditorCreated(wxGridEditorCreatedEvent& evt);
/**
* Concerns the Preferred column only. When the editor is checked, ensures
* the other rows are unchecked.
* @param evt
*/
void OnEditorHidden(wxGridEvent& evt);
void OnPrefCellChanged(wxGridEvent& evt);
/**
* Just calls BasePicker::DoShowPopup().
* @param evt