Use wxDataViewItem, not row to index

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2007-07-16 11:21:28 +00:00
parent b5fce9e2df
commit 6cdcbce3e5

View File

@ -1693,8 +1693,8 @@ void wxDataViewMainWindow::OnRenameTimer()
GetOwner()->CalcScrolledPosition( labelRect.x, labelRect.y,
&labelRect.x, &labelRect.y);
// TODO get wxDataViewItem from m_currentRow
m_currentCol->GetRenderer()->StartEditing( m_currentRow, labelRect );
wxDataViewItem item = GetItemByRow( m_currentRow );
m_currentCol->GetRenderer()->StartEditing( item, labelRect );
}
//------------------------------------------------------------------
@ -2755,13 +2755,13 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
{
if (cell->GetMode() == wxDATAVIEW_CELL_ACTIVATABLE)
{
wxDataViewItem item = GetItemByRow(current);
wxVariant value;
model->GetValue( value, col->GetModelColumn(), current );
model->GetValue( value, item, col->GetModelColumn() );
cell->SetValue( value );
wxRect cell_rect( xpos, current * m_lineHeight,
col->GetWidth(), m_lineHeight );
wxDataViewItem dataitem = GetItemByRow(current);
cell->Activate( cell_rect, model, dataitem, col->GetModelColumn() );
cell->Activate( cell_rect, model, item, col->GetModelColumn() );
}
return;
}