diff --git a/include/wx/dataview.h b/include/wx/dataview.h index 79b200cc09..58b0fdafe4 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -859,7 +859,6 @@ public: // for wxEVT_DATAVIEW_ITEM_EDITING_DONE only bool IsEditCancelled() const { return m_editCancelled; } - void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; } // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only wxDataViewColumn *GetDataViewColumn() const { return m_column; } @@ -907,6 +906,7 @@ public: #endif // WXWIN_COMPATIBILITY_3_0 void SetColumn( int col ) { m_col = col; } + void SetEditCancelled() { m_editCancelled = true; } protected: wxDataViewItem m_item; diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index cbb5ba2566..81c493efa4 100644 --- a/interface/wx/dataview.h +++ b/interface/wx/dataview.h @@ -3818,7 +3818,6 @@ public: */ wxDataViewItem GetItem() const; void SetItem( const wxDataViewItem &item ); - void SetEditCanceled(bool editCancelled); void SetPosition( int x, int y ); void SetCache(int from, int to); wxDataObject *GetDataObject() const; diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index df7ad9cd1f..a7d7597fff 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -798,7 +798,8 @@ bool wxDataViewRendererBase::FinishEditing() // Now we should send Editing Done event wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_EDITING_DONE, dv_ctrl, column, m_item); event.SetValue( value ); - event.SetEditCanceled( !isValid ); + if ( !isValid ) + event.SetEditCancelled(); dv_ctrl->GetEventHandler()->ProcessEvent( event ); bool accepted = false;