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
|
// for wxEVT_DATAVIEW_ITEM_EDITING_DONE only
|
||||||
bool IsEditCancelled() const { return m_editCancelled; }
|
bool IsEditCancelled() const { return m_editCancelled; }
|
||||||
void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; }
|
|
||||||
|
|
||||||
// for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
|
// for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
|
||||||
wxDataViewColumn *GetDataViewColumn() const { return m_column; }
|
wxDataViewColumn *GetDataViewColumn() const { return m_column; }
|
||||||
@@ -907,6 +906,7 @@ public:
|
|||||||
#endif // WXWIN_COMPATIBILITY_3_0
|
#endif // WXWIN_COMPATIBILITY_3_0
|
||||||
|
|
||||||
void SetColumn( int col ) { m_col = col; }
|
void SetColumn( int col ) { m_col = col; }
|
||||||
|
void SetEditCancelled() { m_editCancelled = true; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxDataViewItem m_item;
|
wxDataViewItem m_item;
|
||||||
|
@@ -3818,7 +3818,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
wxDataViewItem GetItem() const;
|
wxDataViewItem GetItem() const;
|
||||||
void SetItem( const wxDataViewItem &item );
|
void SetItem( const wxDataViewItem &item );
|
||||||
void SetEditCanceled(bool editCancelled);
|
|
||||||
void SetPosition( int x, int y );
|
void SetPosition( int x, int y );
|
||||||
void SetCache(int from, int to);
|
void SetCache(int from, int to);
|
||||||
wxDataObject *GetDataObject() const;
|
wxDataObject *GetDataObject() const;
|
||||||
|
@@ -798,7 +798,8 @@ bool wxDataViewRendererBase::FinishEditing()
|
|||||||
// Now we should send Editing Done event
|
// Now we should send Editing Done event
|
||||||
wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_EDITING_DONE, dv_ctrl, column, m_item);
|
wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_EDITING_DONE, dv_ctrl, column, m_item);
|
||||||
event.SetValue( value );
|
event.SetValue( value );
|
||||||
event.SetEditCanceled( !isValid );
|
if ( !isValid )
|
||||||
|
event.SetEditCancelled();
|
||||||
dv_ctrl->GetEventHandler()->ProcessEvent( event );
|
dv_ctrl->GetEventHandler()->ProcessEvent( event );
|
||||||
|
|
||||||
bool accepted = false;
|
bool accepted = false;
|
||||||
|
Reference in New Issue
Block a user