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.
See #17537.
(cherry picked from commit 5d671d8136
)
This commit is contained in:
committed by
Vadim Zeitlin
parent
3cacee9d52
commit
d8e6043602
@@ -4006,7 +4006,7 @@ bool wxDataViewMainWindow::TryAdvanceCurrentColumn(wxDataViewTreeNode *node, boo
|
|||||||
{
|
{
|
||||||
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