Add wxDataViewModel::ChangeValue() and use it in wxDVC implementation.
ChangeValue() is a trivial wrapper calling both SetValue() and ValueChanged(). It allows to replace many calls to SetValue() immediately followed by ValueChanged() with a single function call which is significantly shorter and less error-prone (e.g. most of the existing code didn't test SetValue() return code at all). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -751,8 +751,7 @@ bool wxDataViewRendererBase::FinishEditing()
|
||||
return false;
|
||||
|
||||
unsigned int col = GetOwner()->GetModelColumn();
|
||||
dv_ctrl->GetModel()->SetValue( value, m_item, col );
|
||||
dv_ctrl->GetModel()->ValueChanged( m_item, col );
|
||||
dv_ctrl->GetModel()->ChangeValue(value, m_item, col);
|
||||
|
||||
// Now we should send Editing Done event
|
||||
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, dv_ctrl->GetId() );
|
||||
|
||||
Reference in New Issue
Block a user