Fix wx3.0 (presumably) compile issue.

This commit is contained in:
Jeff Young 2021-10-02 12:39:33 +01:00
parent 671e9f2dba
commit 4e9b747e86
1 changed files with 3 additions and 3 deletions

View File

@ -293,7 +293,7 @@ void LIB_TREE::centerIfValid( const wxDataViewItem& aTreeId )
if( idx + 5 < (int) siblings.GetCount() )
{
m_tree_ctrl->EnsureVisible( siblings.at( idx + 5 ) );
m_tree_ctrl->EnsureVisible( siblings.Item( idx + 5 ) );
}
else if( grandParent )
{
@ -303,11 +303,11 @@ void LIB_TREE::centerIfValid( const wxDataViewItem& aTreeId )
int p_idx = parentsSiblings.Index( wxDataViewItem( parent ) );
if( p_idx + 1 < (int) parentsSiblings.GetCount() )
m_tree_ctrl->EnsureVisible( parentsSiblings.at( p_idx + 1 ) );
m_tree_ctrl->EnsureVisible( parentsSiblings.Item( p_idx + 1 ) );
}
if( idx - 5 >= 0 )
m_tree_ctrl->EnsureVisible( siblings.at( idx - 5 ) );
m_tree_ctrl->EnsureVisible( siblings.Item( idx - 5 ) );
else
m_tree_ctrl->EnsureVisible( wxDataViewItem( parent ) );
}