Change SetValue( wxVariant &value ) to
SetValue( const wxVariant &value )
(already documented)
Delete in-place editing control through
pending list, not in event handler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -603,7 +603,7 @@ void wxDataViewSortedListModel::GetValue( wxVariant &variant, unsigned int col,
|
||||
m_child->GetValue( variant, col, child_row );
|
||||
}
|
||||
|
||||
bool wxDataViewSortedListModel::SetValue( wxVariant &variant, unsigned int col, unsigned int row )
|
||||
bool wxDataViewSortedListModel::SetValue( const wxVariant &variant, unsigned int col, unsigned int row )
|
||||
{
|
||||
unsigned int child_row = m_array[row];
|
||||
bool ret = m_child->SetValue( variant, col, child_row );
|
||||
@@ -744,21 +744,19 @@ bool wxDataViewRendererBase::StartEditing( unsigned int row, wxRect labelRect )
|
||||
|
||||
void wxDataViewRendererBase::CancelEditing()
|
||||
{
|
||||
// m_editorCtrl->PopEventHandler( true );
|
||||
|
||||
delete m_editorCtrl;
|
||||
wxPendingDelete.Append( m_editorCtrl );
|
||||
|
||||
GetOwner()->GetOwner()->GetMainWindow()->SetFocus();
|
||||
|
||||
// m_editorCtrl->PopEventHandler( true );
|
||||
}
|
||||
|
||||
bool wxDataViewRendererBase::FinishEditing()
|
||||
{
|
||||
// m_editorCtrl->PopEventHandler( true );
|
||||
|
||||
wxVariant value;
|
||||
GetValueFromEditorCtrl( m_editorCtrl, value );
|
||||
|
||||
delete m_editorCtrl;
|
||||
wxPendingDelete.Append( m_editorCtrl );
|
||||
|
||||
GetOwner()->GetOwner()->GetMainWindow()->SetFocus();
|
||||
|
||||
@@ -769,6 +767,8 @@ bool wxDataViewRendererBase::FinishEditing()
|
||||
GetOwner()->GetOwner()->GetModel()->SetValue( value, col, m_row );
|
||||
GetOwner()->GetOwner()->GetModel()->ValueChanged( col, m_row );
|
||||
|
||||
// m_editorCtrl->PopEventHandler( true );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -831,7 +831,6 @@ void wxDataViewEditorCtrlEvtHandler::OnKillFocus( wxFocusEvent &event )
|
||||
m_owner->FinishEditing();
|
||||
}
|
||||
|
||||
// We must let the native text control handle focus
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user