Fix keyboard navigation crash in single column generic wxDataViewCtrl
Selecting a leaf node in a wxDataViewCtrl and then pressing the right arrow key resulted in using an out-of-bounds index for accessing the columns list. Fix this by setting the current column to the first one, and not to the second one which might not exist. Closes #17537.
This commit is contained in:
committed by
Vadim Zeitlin
parent
311b4d1b14
commit
5d671d8136
@@ -3959,7 +3959,7 @@ bool wxDataViewMainWindow::TryAdvanceCurrentColumn(wxDataViewTreeNode *node, wxK
|
|||||||
{
|
{
|
||||||
if ( forward )
|
if ( forward )
|
||||||
{
|
{
|
||||||
m_currentCol = GetOwner()->GetColumnAt(1);
|
m_currentCol = GetOwner()->GetColumnAt(0);
|
||||||
m_currentColSetByKeyboard = true;
|
m_currentColSetByKeyboard = true;
|
||||||
RefreshRow(m_currentRow);
|
RefreshRow(m_currentRow);
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user