Send wxEVT_DATAVIEW_ITEM_EDITING_DONE after cancelling too

Previously this event was not sent at all if editing the item was
cancelled, e.g. by pressing Esc.

Do send it now from the generic implementation and update the sample to
show this event.

See #17835.
This commit is contained in:
Vadim Zeitlin
2018-02-04 22:40:51 +01:00
parent 7e3d28e79f
commit 1e3e5b7253
4 changed files with 46 additions and 15 deletions

View File

@@ -259,6 +259,9 @@ protected:
wxDataViewCtrl* GetView() const;
private:
// Common part of {Cancel,Finish}Editing().
bool DoFinishOrCancelEditing(bool cancelled);
// Called from {Called,Finish}Editing() and dtor to cleanup m_editorCtrl
void DestroyEditControl();