fixed sending 2 events (normal and bogus cancel one) when ending to edit a tree ctrl item (same thing as patch 978403 for treectlg.cpp)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28516 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b082b52407
commit
768276f6ed
@ -2074,12 +2074,14 @@ void wxListTextCtrl::OnChar( wxKeyEvent &event )
|
|||||||
switch ( event.m_keyCode )
|
switch ( event.m_keyCode )
|
||||||
{
|
{
|
||||||
case WXK_RETURN:
|
case WXK_RETURN:
|
||||||
if ( !AcceptChanges() )
|
if ( AcceptChanges() )
|
||||||
{
|
{
|
||||||
// vetoed by the user code
|
// Close the text control, changes were accepted
|
||||||
break;
|
Finish();
|
||||||
}
|
}
|
||||||
//else: fall through
|
// else do nothing, do not accept and do not close
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
case WXK_ESCAPE:
|
case WXK_ESCAPE:
|
||||||
Finish();
|
Finish();
|
||||||
|
Loading…
Reference in New Issue
Block a user