wxDataViewCtrl: enable F2 editing with multiple selection too.
This matches the native (and thus expected) behavior of Windows Explorer: edit the first item in selection. It's also better than ignoring user's key presses. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d6397a9f35
commit
a027a36f2c
@ -3379,7 +3379,7 @@ void wxDataViewMainWindow::OnChar( wxKeyEvent &event )
|
|||||||
|
|
||||||
case WXK_F2:
|
case WXK_F2:
|
||||||
{
|
{
|
||||||
if(m_selection.size() == 1)
|
if( !m_selection.empty() )
|
||||||
{
|
{
|
||||||
// TODO: we need to revise that when we have a concept for a 'current column'
|
// TODO: we need to revise that when we have a concept for a 'current column'
|
||||||
GetOwner()->StartEditor(GetItemByRow(m_selection[0]), 0);
|
GetOwner()->StartEditor(GetItemByRow(m_selection[0]), 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user