Fix assert when destroying wxDataViewCtrl being edited in wxGTK.

If wxDataViewCtrl was destroyed while showing a generic editor, an assert
occurred in wxWindowBase dtor as the event handler pushed on it by the editor.

Fix this by calling CancelEditing() when the control is destroyed and also fix
the crash in CancelEditing() in wxGTK due to recursive calls to FinishEditing().

Closes #12683.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-04-26 22:57:01 +00:00
parent b3a8aa924a
commit b2fd3bea36
3 changed files with 38 additions and 7 deletions

View File

@@ -192,6 +192,12 @@ private:
virtual wxDataViewItem DoGetCurrentItem() const;
virtual void DoSetCurrentItem(const wxDataViewItem& item);
// Return wxDataViewColumn matching the given GtkTreeViewColumn.
//
// If the input argument is NULL, return NULL too. Otherwise we must find
// the matching column and assert if we didn't.
wxDataViewColumn* FromGTKColumn(GtkTreeViewColumn *gtk_col) const;
friend class wxDataViewCtrlDCImpl;
friend class wxDataViewColumn;
friend class wxDataViewCtrlInternal;