Rename wxDataViewEvent::SetEditCanceled() and remove its argument
This method should be only used when the edit is really cancelled, so it doesn't need to take a boolean argument. It should also use the same spelling as IsEditCancelled() (and for consistency with the rest of wxWidgets API which uses British English). Also remove this method from the documentation, it is not part of the public API.
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user