From a027a36f2c15b98dd3e2c42de406f4c4593cca76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 5 Sep 2011 14:25:31 +0000 Subject: [PATCH] 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 --- src/generic/datavgen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 5850e4a00d..b7bcd11253 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -3379,7 +3379,7 @@ void wxDataViewMainWindow::OnChar( wxKeyEvent &event ) 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' GetOwner()->StartEditor(GetItemByRow(m_selection[0]), 0); -- 2.50.0